Welcome to RC! Best way will vary. If just a couple, kalk paste, peroxide or boiling water injected into them usually works well. Some use Berghia Nudibranch if they have a large infestation (seems very effective but takes longer). There’s also peppermint shrimp, Aiptasia eating filefish, and copperband butterflies. All can be hit or miss.
Best way to detect them is to carefully inspect frags and in my opinion, if you have the space and ability, a coral quarantine where the frags can be observed for a couple weeks.