This is a bristleworm. Bristle worms are common detravore that live in the live rocks and the sandbed of a reef tank. While these critters look mean and nasty 99% of them are totally harmless to your reef and your fish.
A common inhabitant of a reef tank or a [acronym:5b389b2d15="Fish only with live rock"]FOWLR[/acronym:5b389b2d15] tank.