One of the best ways to protect your system is to develop computing 'street smarts' and know how to identify and avoid suspicious locations and files on the Web however, this takes time to develop. OS X includes a number of security measures to combat malware (Gatekeeper, XProtect, and a built-in Firewall) however, no system is completely foolproof.