To say that Macs have their own built-in anti-virus software is a bit of a misnomer. They have certain protections that prevent anything but trojan horses. And even then you must really have some serious gullibility problems to allow a trojan horse on your system. By default, root user is disabled. When you turn on the software sharing firewall and uncheck all the boxes in Apple menu -> System Preferences -> Sharing your Mac's inbound networking ports are in stealth mode. That won't prevent a ping attack from creating havoc on your network. A good router with ping attack prevention will.
Dialogs may come up as you browse the web claiming you got a virus, but when you check the download folder more times than not, the file is a .exe file, which 99% of time poses no risk at all, unless you run Windows on your Mac. Zip files sometimes can be masked as .exe file and extract that way. And since plugins make a lot of the web, they can leave behind bad cookies or cache files, that can seriously slow down your browsing. If you get a nuisance dialog the best action is just to command-option-escape and force quit the web browser, and not respond to any dialogs. Because someone could make an innocuous response to a dialog download a bad cookie of some sort or redirect you to a trojan horse of a web page that looks innocuous, and if you don't pay attention to the exact link you went to it can be an illegitimate website spoofing a good one.
People more at risk, open their Macs on file sharing services to download illicit software. I have helped people who have, and found many stolen software titles masquerade as final release software titles, and really are buggy releases, or ones that do not belong to the original publisher. Stay away from torrent based downloads, and peer2peer stolen software to avoid the darker sides of the internet.
E-mail downloads can be risky if they have executable AppleScripts. Do not enter your administrator password for any download from an untrustworthy source. I actually go as far as to turn off all automatic updates, and go occasionally to Adobe And Java.com to see if there are updates I might need, or to the App Store. That way, I know any popup window I'm getting is not from a source I trust.
Your most important prevention is a good backup plan*:
http://www.macmaps.com/backup.html
* Links to my pages may give me compensation.