Stopping adverts bothering you in your web browsing experience
Stopping spammy web adverts
An effective way to stop or reduce adverts on your computer is to edit the hosts file that defines your DNS servers (effectively, trick your web browser into not downloading them in the first place).
On Apple and other UNIX-like machines, edit the file /etc/hosts like so:
sudo vi /etc/hosts
On Windows the file is C:\Windows\System32\drivers\etc\hosts
The trick is to create DNS entries for the offending sites by pointing them at your own machine (127.0.0.1). Since your machine won't understand the request, it will simply reply with a 404 error and the advert won't appear (it will be a blank placeholder).
On Apple you also have to run
sudo killall -HUP mDNSResponder
sudo dscacheutil -flushcache
You can get another listing from https://winhelp2002.mvps.org/hosts.htm and http://someonewhocares.org/hosts/