how-to block ads
If you put ad server names into your Hosts file with your own computer's IP address, your computer will try to connect to your own computer each time it's pointed to that ad server, and since there's no ad on your own computer, nothing is displayed, nor will any tracking take place.
Your choices for blocking sites are not just limited to blocking ad servers. You may block sites that serve advertisements, sites that serve objectionable content or any other site you choose to block.
You can read more about the Hosts file and how it works here. Download (eDexter or HostsToggle) to make browsing with the Hosts file smoother, faster and easier.
Here are two different Hosts files (updated frequently):
hpguru's Hosts file
MVPS Hosts file