To explain the hosts file: First, a bit of background about how the Internet works. A server’s real name isn’t the word-name that you’re familiar with, like boards.straightdope.com. The server’s real name is a string of numbers, like 207.97.195.229 . Whenever you type in a word-name, your computer contacts a computer called a domain name server, or DNS, and asks that server what the number is for that server.
Enter the hosts file. The hosts file stores a list of server names and their numeric addresses, right on your own computer. If a server’s name is listed in your hosts file, then your computer doesn’t need to ask a DNS for the address, it just looks it up in the hosts file. Originally, the purpose for this was to make it easier to access commonly-used sites. But the information in the hosts file doesn’t have to be accurate. If you put in a server name and the wrong address, your computer won’t be able to access that server. In particular, if you put in the name of an advertising server, you won’t see any ads from that server.
If you already have a hosts file, it’ll be in your Windows directory. It’s a plain-text file, but the full name is just “hosts”, with no .txt or other extension. If you have it, open it up in Notepad. If not, then open a new file in Notepad. Either way, you’ll add a new line to the file for every server you want to block. A line might look something like this:
ads.doubleclick.com 127.0.0.1
ads.doubleclick.com is one of the more common advertising servers, and 127.0.0.1 is the numeric address that means your own computer (hence why some SDMB members have 127.0.0.1 listed as their location). But of course, your own computer is not really ads.doubleclick.com, so if that’s where your computer is looking for the ads, it’s not going to find them.
Now, save that file, back in your Windows directory. If you created a new file with Notepad, it probably took the liberty of sticking .txt on the end of the file name. If so, edit the name to remove the extension (Windows will ask you if you’re sure that’s a good idea; it is).