These ads that are used to deliver malware are displayed on many popular sites including: The New York Times, NFL.com, MSN, AOL, and many others. The criminals are able to make ads that look normal to these sites and users, but secretly deliver malware.
One of the most disruptive types of malware that is delivered this way is ransomware. Ransomware encrypts your files and requires you to pay a ransom to get your files back. Sometimes you pay the ransom and still don't get your files back.
One of the ways to protect yourself while web browsing on the Internet is to use ad blocking software. This will prevent ads from displaying. Many web sites are funded by advertising, so you may receive messages that the site require that you unblock ads to view the site. Forbes is one of the largest sites to require this.
Another way to lessen your risk is to remove web browser plugins like flash, java, and silverlight. This will reduce the attack surface or the number of programs that the attacker can use to infiltrate your computer.
The most important thing to do is to stay aware. If your computer starts acting differently you should take action. If you catch the malware before it has had a chance to do much, you can often safely remove it.