Does APPLE Mac OS get affected by viruses?

Hi experts,
I have never used Apple's Macintosh Operating system. But I have heard that it never gets affected by Viruses!
As a user of windows OS, it is really hard to believe that an operating system never gets affected by viruses.
How is it possible and what are the reasons of too much virus in Windows Operating System?
Is there any possibility of any new virus that will attack Macintosh operating system?
Please tell me in as detail as possible.
Thanks.
