They are most likely Threadworms(Nematodes).
Unfortantly, There were no cure for them when my guppys had them a while back.You may want to check with your local fish store to see if there is something to treat all the fish and the tank.
There is a middle stage where the eggs are , and a final stage where the worms are in the intestinal tract, and hanging from the anus.
They block the fish from excreting waste, so they are most likely suffering, and will die from it. Euthanization, or a quick cure from a med is the what must be done.
HTH