BIG problem, and a bigger problem is that they multiply VERY quickly. I'm going to suggest 3 free anti-spy, ad, and virus software. I use them all consistently, and know them well. I also use all three here at my job (elementary school tech instructor) and trust them. I've noticed that using more than one may be necessary. You'll get other suggestions as well...
Once they get in, they're like roaches. Here are some proven killers.
Virus: AVG Free Edtion 7.5 at
http://free.grisoft.com/freeweb.php/doc/2/ and select "download free version". It's easy to use, and updates and scans daily. It includes e-mail protection as well as constant "monitoring". As it finds viruses, you can delete them (sometimes you can't) or lock them in a vault. My school district uses AVG on every computer (3,000+) and we're very happy with it. I even installed on my mom's computer!
Adware are a prime source of the pop-ups you describe. At
http://www.lavasoftusa.com/products/ad-aware_se_personal.php is a highly-rated and award winning program. Again, it's free. Read the description, and if you want it, just click Download. Before you run a scan, make sure to run the update first. It will start daily like AVG, but you should do it everyday for about a week, then after it looks like it has everything under control, run it once a week.
Finally, another highly-rated detection tool is SpyBot Search & Destroy at
http://www.safer-networking.org/en/index.html Also free and very good, it's really good at finding anything AdAware misses. Go through the Help section first because it can seem complicated, and will require an update by you before a scan. It comes with an immunization feature that keeps things out VERY well.
And last, click Tools on your browser menu bar, and select Internet Options. Click the tab for Content. Click Enable for ratings that Control Internet Content... It's self-explanatory from there. It won't stop everything, but it works almost TOO well sometimes (always click Apply when done!). Also, if there's one site that always somehow to get through (there always seems to be one) on the same ratings page, you can go to Approved Sites and enter the site there, and select NEVER.
By using these tips, you should see a vast improvement. But remember, these guys are tenacious.
Other suggestions may be for Norton, but I've had and heard more problems than positives about it. And formatting our hard drive is an absolute last resort, and there are 100+ more things I'd try before that. I don't give up that easily.
(One last thing, my Google Toolbar is absolutely BRUTAL at blocking pop-ups, plus the search window is very handy. It even blocks the pop-ups that you want. Click the pop-up symbol and you get the ones you want, while killing the ones you don't. I think Yahoo has one too, but Google's with all of it's fun features, in my humble opinion, is better. Get it at
http://toolbar.google.com/T4/index_xp.html )
Sorry for the extended answer, but it's a VERY important question. If you have any problems running any of the programs I mentioned, contact me off of my profile. Good luck!!