Macs can absolutely get infected with malware and viruses. However, given the design of OSX, it's harder for criminals to get in. The problem is once they are in, you often will NOT know it. The most dangerous infections are those you can't see. Junkware throwing up bogus infection notices asking for $59 to clean your computer leads people to believe they'll always 'know' they are infected. So to be safe, you should run some type of anti-virus on your Mac, even if it's a scanner you run once a week.