How long has the tank been set up? Judging from the look of the rock, it doesn't look like it has been that long.
Assuming that it is a young tank, I'd just let them run their course. They obviously bloomed because there is an excess of something that they like in your tank. I'd guess that they'll die off or reach a lower and more stable population as the tank matures.
As far as what they are, you got me. I can't really tell from the picture.
For what it is worth, many peoples' "knee-jerk" reaction is to kill something that they can't identify. From my experience, I've found that most worms and things that show up in our tanks are relatively harmless. Unless someone can absolutely tell you it is a pest, I'd say leave it be and see what happens. But that is just my take on things....