Flatworms come in many shapes and sizes. They can be brown, green or red, often with a white strip down the middle of the back. These animals feed on bacteria and coral slime and are thought to be relatively harmless. The problem comes when you get a population explosion in the tank and they begin to cover every available surface, including your corals. They become a real eyesore and can also severely cut back on the amount of light the corals receive.
Fish are the most effective biological controls for flatworms.
Wrasses are very interesting fish in that if there is something that occurs on a reef there is usually a wrasse that eats it. In the few cases where I have experienced flatworm outbreaks the populations eventually disappeared in about 6-8 weeks. Flatworms often appear in new aquaria with live rock, with new pieces of live rock added to an already established reef aquarium, and with new pieces of coral. This is why it is prudent to carefully inspect new arrivals for suspicious hitchhikers and to quarantine new pieces in a separate tank to make sure they are pest free. Often vigorously shaking the piece in a bucket of seawater is enough to dislodge flatworms.