Mac OS-X is a version of Linux compiled for the MAC with additional specalized applications added. Although there are a few viruses for Linux based systems they are few and far between but you cannot say that the MAC and Linux are Virus free. They are more secure and harder to infiltrate than systems running Microsoft Windows based Operating system. If you are interested then before you go re-formatting your hard drive and blowing away your windows installation I suggest installing a Virtural Hosting application like Oracle Virtual Box or VMware workstation. Then you can try the OS as a virtual machine under Windows and see what you think.
Most of it is explained in the post above. OS X and Linux is not malware free. One of the reasons behind this is that less people are using those operating systems and the reason of infecting something is therefore less than on Windows. There are a lot of reasons why OS X and Linux in general is more safe than Windows but it would simply take too much space to explain it all.
rch1231; I'm sorry to say that you are not right on the assumption that OS X is a compiled version of Linux. OS X is build upon UNIX and it's one of the very few true still-in-use operating systems left. Linux on the other hand is a UNIX-like operating system.