A recent version of malicious software called Flashback exploits a security flaw in Java in order to install itself on Macs.
Apple has released software updates for systems running OS X Lion and Mac OS X v10.6 that will update Java to fix the security flaw, and remove the Flashback malware if it is present.
A standalone update is also available for OS X Lion that will remove the Flashback malware from systems that do not currently have Java installed.
By default, your Mac automatically checks for software updates every week, but you can change that setting in Software Update preferences. You can run Software Update at any time to manually check for the latest updates.
In addition to the Java vulnerability, the Flashback malware relies on computer servers hosted by the malware authors to perform many of its critical functions. Apple is working with ISPs worldwide to disable this command and control network.
For Macs running Mac OS X v10.5 or earlier, you can better protect yourself from this malware by disabling Java in your web browser(s) preferences.