KILL IT WITH FIRE! That is an Oenone worm, family under Eunicida, and one of the worst worms you can ever possibly get in your tank.
They are predators of other worms, clams and gastropods(snails). I've battled them continuously in all the 17 years I've been in the hobby. My 15-gallon tank is balanced on a razors edge nutrient wise, as I have no possibility of snail-based algae control, due to their presence.
Edit: They secrete a thick snotty mucus that contains a paralytic venom, and are also capable of dissolving and boring through shells.