If they're on your fish, it's bad. If they're not, they're most likely harmless. However, I'm worried because you say your fish are not active, which is why I asked for water parameters. You could have a couple of things going on here. The planaria (or nematodes), which are squiggly clearish-white worms in the water column, are harmless, but are usually due to overfeeding/undercleaning. A type of worm which attaches itself to your fish is a parasite, and needs to be treated for. However, listless fish are attached to a whole different slew of problems, most of which are due to water quality. Ammonia, nitrite, nitrate levels, as well as a better description of the worms' activity, will help narrow down the causes.