Probably planaria. If they are free-swimming and on the glass and not attaching to any fish, then that is likely what they are. They are not harmful in and of themselves but they are indicative of too much nutrient in the water. They have to have a food source and usually it is decomposing food in the substrate. To get rid of them do some deep gravel vacuuming, and some big water changes daily for a few days to thin out their numbers. Then, see about cutting your feedings back some. Salt in the water can help, but without any idea what your fish are, I can't say for sure wether it is worth it. Some folks recommend quick cure, but why stress the fish over something that isn't harmful and can be treated easily enough? Onec the detritus is cleaned out and the fish are fedonly what they can eat, they'll have no way to thrive. Good luck.