More than likely planaria or nematodes.
Some questions, are they...
Little white squiggly worms aprox 1/16"-1/8", that are freefloating and on the glass?
Or are they on your fish?
Free floating? More than like they are Planaria or Nematodes that are caused by excessive nutrients/lack of maintenance, aka a dirty tank.
The best course of action is to;
1) Very thoroughly and deeply vacuum your substrate, do this daily for about a week.
2) Rinse your filter media and media chamber in a bucket of tankwater.
3) Raise your temp (slowly) to 86'-90'f.
4) Don't feed for aprox five days (will not hurt your fish) and then cut back on regular feedings (smaller portions and less frequency).
5) Add a dose of salt to the water, standard aquarium dosage (1tblspn per 5gal) is fine but you may dose higher (up to 1.001 SG(specific gravity).
On the fish? Clinging or hanging off/out of its body/anus?
Then you could be dealing with parasitic nematodes or any of a host of other parasites. Drastic measures such as a anti-parasitic medication may be needed.
Lets see how you answer and then go from there.
HTH