There are many ways to get rid of them and everyone has their own prefered method.
The "natural" way to kill it is with its natural predator. Most people chose peppermint shrimp as they're the cheapest natural solution, but some shrimp don't seem to eat aiptasia (even if they're advertised to). Personally mine has. You wouldn't want to add a peppermint shrimp until after your tank is cycled, though. The same goes for filefish and certain butterfly fish that eat the aiptasia; you'd want to wait until your cycle is done PLUS make sure they'd be able to live in your tank if you plan to keep them.
There's medicine liked Aiptasia-X that you squirt on the anemone to kill it. Some people also use kalkwasser and make a paste out of it to cover the anemone and kill it. Another popular option is to take hot lemon juice or boiling water and inject it into the anemone with a syringe, but this takes a quick hand and access to a needle tip syringe.
Other methods include having the anemone retract and covering it with super glue to suffocate it (there's a certain superglue you have to use, I'm not sure which), or taking the rock out and burning the aiptasia with a lighter.
Hope that helps!