The Apple Mac OS 10.6 + detects the few malwares downloaded from internet as per the signatures found in XProtect.plist file. This is not an antivirus application and only alerts the user when he tries download/install the suspicious application from internet. This file is located at /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.plist. You will need a good security software to protect your mac from bad guys on internet. you can read more on this here and here