For years now I've been using a freeware application known as Popup Killer to block out unwanted advertisements. I've tried several of them from a wide variety of sources, but every time they've failed to match the very simple and effective performance of this plucky little application. Originally developed by xFX, the program ceased to be developed in March of 2002. Since then the name has been twisted and copied (downloading "Popup Killer" from download.com or ZDNet will instead bring you some horrid abomination at the hands of Meaya software), and for the most part the original PK utility has been lost.
Fortunately the creators allowed the code to be released open source, and a project has since been created on Sourceforge. The version owned and downloaded by everyone is 1.45.4, and is available at http://sourceforge.net/projects/puk/. The program is designed for Windows, and my experience with it has been limited to IE.
The program itself is extremely simple. Browser windows are run through a filter which tags certain words in the title and address bar ("Gator" for example), and if there are any matches the window is closed instead. The program also offers a "Smart" option which checks the window size against a preset option; if there's a match the window is closed. You can set just how smart the program is by a slider option, and you can also disable browser closing by using Control or via a checkmark in the program.
The core of the program lies within a .ini file called a blacklist. Here is where the filter information is stored. Unfortunately the automatic update option no longer functions, so you'll be forced to manually improve your blacklist. I've provided my method for doing so below...
1. Visit the most infested websites on the planet, and visit a variety of them.
2. Whenever you experience a pop-up or pop-under, find the source address to that pop-up. This can be done in Internet Explorer by right-clicking the pop-up and looking at its properties.
3. Now we add it to our blacklist. To do this, press CTRL-A. Put the copy/paste the popup address into the text box, and click the "Add to the Black List" circle.
4. Before you add the popup, go back to the text box. Delete most of the address until you're left with just the main body of the address, and add asterisks to just before and after it. Using http://www.everything2.net as an example, you would end up with *.everything2.* in your text box. This will ensure that any popup coming from everything2 (whether it's www.everything2.com or pr0n.everything2.tv) will be filtered out.
5. Repeat process until you no longer get popups, or are tired of looking at offers for sex, drugs, or monkeys.