I would get them out of your tank asap and take them right back to the store you got them from! If they are flatworms (or worse, Acropora Eating Flat Worms), they can be a pain to deal with. The stars are fixable with harlequin shrimp but if the LFS is selling corals with flatworms, I would find a new source for corals asap! If they are red planaria worms, you can likely get most of them with a dip in Revive or Lugol's. But I would advise you to just take the corals back and deal with two less headaches.....