There is no consensus on this, and their tend to be anti-mac people (I am one) and anti-pc people. Macs have just as many security holes, but since they make up a smaller portion of the market, fewer viruses are targeted for them, and so they see less of the viruses and adware.
You can see some of the same thing with the different browsers that are out right now. IE is the most common, and has the most viruses/adware written for it. Firefox is the new one, and since few people have targeted it yet, it doesn't experience too many viruses or adware yet.
In my opinion, they're all just as prone to viruses and adware, but I like windows better. It's more compatible, primarily because it has a larger market share, and so more people design for it. Windows also give you access to some of the workings that the mac hides, I think mac suffers from being too "user friendly" in that respect. I would definitely recommend a PC, but that's biased.