If they are tiny it is usually planaria.If they are longer,more worm like it is more likely to be nematodes.Both are harmless.Over feeding or not enough water changes is usually the reason.Up your w/c's to 30% at least if not more, reduce the amount you feed and they should disappear.I personally do 70% a week on all my tanks regardless.