See this Apple support document:
Select ▹ Software Update to install the latest Java update (if Java is already installed) or the Flashback malware removal tool (if Java is not installed under Lion), as well as any other available updates. Installing either of those items should clear the infection in most cases. You must update to the latest version of Mac OS X 10.6 or 10.7 before you can install the Java update.
The removal tool runs automatically in the background and is then deleted. Don’t look for something to click. If the malware is removed, you’ll be notified.