If they're red planaria flatworms (I can't tell from the pic), you can use Flatworm Exit like Marc says (see Chris' link) or just wait them out like I did. The owner of the LFS I used to go to told me they usually run their course and then fade away, and he was right. My tank was covered with them, and now I have to look hard to find one. Of course, maybe I just got lucky.