Yup, those are the red photosynthetic flatworms. BUT the are NOT planaria. As has been pointed out many times, planaria are freshwater flatworms, they are white and non-photosynthetic and, generally, are much smaller than what we see. It generally takes some magnification to see planaria.
How do you get rid of them? I have a six-line wrasse that eats them but that's a hit and miss situation, much like peppermint shrimp eating aiptasia. I've heard of a couple of other critters that will eat them but don't remember their names. I wouldn't be too concerned about them, though; their population tends to wax and wane and they really don't hurt anything other than be a little unsightly.