If your Windows installation is FUBAR, back up everything that you consider important - music, documents, pictures, browser bookmarks, etc. Burn them off to CD/DVD or put them on a USB drive.
Seven7Thirty30 has some good points. Make sure your computer can boot from CD so that you can boot the Windows installation disk. If your system can't boot and you need to get back in, the repair installation hopefully will help.
If Windows is just acting funny, and you want to start from scratch, scour the internet for "how to reinstall windows", or something to that effect. You'll get more tutorials than you can shake a stick at (or whatever.) Since this is your first time, print it out, or keep another computer right next to you as you reinstall.
The steps are pretty straight forward. It's more or less wipe the drive, set a C: drive (partitioning), and let it installation go. Once you're in the Windows environment, install the drivers that didn't get autodetected, visit Windows Update, and install your antivirus/firewall/antispyware apps. That's it.