They have an internal parasite. Parasites live in the tank, but they
are usually kept at bay by the fishes' immune system. The parasites can be treated with medicated food, you can medicate food yourself with the
appropriate medicine, you can set up a hospital tank and medicate the hospital tank water, or lastly, you can medicate the whole tank.
Immediately, you can do a water change, and vacuum the gravel to improve
water quality, and reduce stress on the fish. If you medicate the tank, remove any carbon in the filter. If you have a planted tank, make sure the medication you use is safe for planted tanks.