The heart of the OS, being Unix, no. Maybe 30 years ago when it was first programmed, yes, but not today.
However, some support programs can be susceptible. Examples are Flash, Java. And of course, if you get conned onto installing programs from unknown origin, you get the same effect even though they're not viruses. Called Social Engineering, a favorite ploy of the hackers.
And many purveyors with shady motives will try to scare you into purchasing their wares to protect against the phantom menaces.
See Thomas Reed's excellent Mac Malware Guide. I used one of his 'best' av agents, Sophos for Mac, to scan all of my drives and found nothing (but then I didn't expect that I would). I'm trying Sophos for a month so I can, if needed, recommend it to other users who might feel a need for av software.
Also see his Mac Anti-Virus protection rates - we all used to recommend ClamXav but it sort of fails the test at present.