The go to method is using a product called Hikari Prazipro.
Prazipro has been found to be very effective in the eradication of flukes in marine fish, and cannot be overdosed either. This is a gentle treatment, so gentle in fact that it can be used in a reef tank without any ill effect on corals and vertebrates, with the exception of wrasse. A wrasse may be temporarily removed into a separate tank until it is safe to return it to the main tank. (See this article on how I caught my wrasse.)
Prazipro does affect the oxygen levels in an aquarium and for this reason it is recommended that the water is aerated throughout the entire treatment. It may also reduce fish appetite.
Each treatment of Prazipro is between 5 and 7 days, with a large water change and a change of carbon following each. Multiple treatments may be required.
Once successfully treated, keep an eye on the affected fish for up to a month to ensure all flukes have been accounted for. You may still see your fish flashing against rockwork but this would be due to the affected areas healing.