The picture is too small to be sure, but they look like flatworms. Some species attack corals and some are fairly benign. Regardless, they can reproduce and end up in the hundreds in your tank. There are reef safe medications (Flatworm Exit) that kill them, but do some research. I've heard that killing them off in large numbers can contaminate the tank and cause an ammonia spike.