As far as I remember there has been a few 'viruses' for the Mac over the years but usually they're called 'worms' for some reason.
As the Mac platform becomes more popular prepare for an influx of 'defender' style attacks, you just need to be aware that frequenting 'dodgy' sites usually leaves something behind in your system.
It still makes me laugh that Microsoft made a fortune selling off the original 'tools' to enable companys to infect machines then offer you a paid subscription to remove 'their' virus.
Absolutely hilarious.