Lernea is a genus of copepod crustaceans also known as anchor worm. This parasite often infects fish that are kept in ponds, such as koi and goldfish. This creature is actually not a worm at all . It is the feeding stage of a copepod called Lernae. During the free-swimming stage, the female anchor worm mates then burrows itself into the flesh of a goldfish and transform into an unsegmented , wormlike form, sometimes with a portion hanging from the fish's body. It is seen on goldfish as a reddish wormlike thread, about 1/4 inch long, often attached to sides and back of the fish, near the fin bases. It then feeds on the goldfish's body fluids and eventually destroys the gill and muscle tissue. After the parasites are imbedded in a goldfish's gills, the fish may be seen trying to violently shake its head in order to rid itself of the parasites.
A chemical in medication that is marketed to treat worm infections called trichlorfon (also known as Dylox) has been shown to be effective against this type of parasite.