There's a fascinating article over at CNET, in which a reporter asks a bunch of security experts which operating system is more secure: Windows or Mac. She quoted them at length, and got some real insight, I think.
If I were to sum up the general gist of the comments, it's that you're at less risk of being hacked or attacked if you use a Mac. But not because Macs are inherently safer than the last two versions of Windows -- Vista and Windows 7. According to most of these experts, it's because of Windows' larger market share; you can simply do more damage (or get more computers on your "botnet" -- networks of computers that bad guys use without the knowledge of the users themselves).
Toward that end, I strongly encourage you to check out About.com's antivirus site. It's got tons of great information on keeping yourself safe on the 'Net.
Another interesting point was that the experts pointed to what they felt was the greatest avenue of risk, and it wasn't either OS, but instead, the web browser. This was true whether it's Internet Explorer on Windows, Safari on Mac, or Firefox or Chrome, other competing browsers.
Remember, whether you're a Windows or Mac user (and there's plenty of room for all of us!), you can keep yourself much safer by taking some standard precautions.