They appear to be very large cercaria, which are a stage in the lifecycle of parasitic flatworms. They were probably introduced into the tank by one of your snails and are now looking for their next host, which would probably be either a bird or a fish. If their definitive host is a bird, then they should just die. However, the snail that brought them in could potentially produce more for the rest of its life.
If the definitive host is a fish, they could pose a serious health threat to your fish and some action will need to be taken to eradicate them. For safety's sake I would assume that this is the case. The fish diseases forum would probably be the best place to get advice on treatment.
Also, be sure to wear gloves when you're working in the tank. Although these aren't parasites of humans, cercaria of some species will mistakenly attack us and burrow into the skin, where they die and cause an itchy rash.