On the 14th of March, a Dutch newsite was found to be spreading malware, particularly a rootkit and trojan. The linked article goes into some technical details on how this happened, but basically, it shows that the vector of infection was most probably a hacked advertisement banner. Major sites with lots of traffic sell advertisement space on them but they don’t handle the advertisement themselves, they have another company handle it. Sometimes, those advertisement companies get their banners hacked and the harmful url or script is injected. So, as this example shows, people visiting the news site were infected when the infected/hacked ad showed up and the malicious script was run.
How can you defend against these types of attacks? Use an Antivirus that has real-time protection. Though no program is able to protect you from all threats, a good quality antivirus will give good protection, especially if they have a script scanner like Avast does. You may also look at using Firefox as your browser with the NoScript add-on. As stated in the comments section of the article, Firefox with NoScript would prevent this type of infection. Another add-on for Firefox is AdBlock+. AdBlock+ blocks ads from showing up in the first place so the threat of a hacked ad even appearing in your browser are minimized. If you are using Internet Explorer 9, you can go into the add-on manager and under Tracking Protection, add Easylist and Fanboy add-ons to block ads. The full article can be found here.