It's some type of polychate - either a bristleworm or a fireworm, looks like a fireworm to me. They used to have a bad rap in the hobby, but these days are mostly considered neutral/slightly beneficial hitchhikers. They're detrivores, so they'll eat leftovers and waste from your other animals.
Do not handle them directly unless you like pain. Those little bundles of bristles you see on each segment are needle-thin, go straight into your flesh, and carry a nasty sting. Usually not dangerous unless you're allergic, but from what I understand they are quite painful (that's why they're called fireworms).
There are some animals that will eat them (arrow crabs, especially, along with some fish) but it's usually not worth trying to get a predator in for them - despite the risk of a sting, I personally don't think they cause any problems, with one exception. I think they will eat the eggs of berghia nudibranches, so they do interfere with your ability to use berghia to combat aiptasia.