If you are hard connected to the net pull the cable from your computer and/or modem. If you are wireless either open up your case and yank the wireless card or unplug your usb wireless hub. After doing so insert the Windows XP/98/95 cd into the cd-drive. Restart your computer and start hitting F8 or delete to enter the BIOS screen. At the BIOS screen look for the section that contains your drives, aka hard drives and optical drives like your cd-drive. Make it so your computer boots from the cd drive (typically this end's up being D

. Once you have done this exit and save your settings. Your computer will now boot from the Windows cd in the cd-drive. Choose the option that reformats your hard drive and go from there.
Once Windows is reinstalled reconnect to the internet and go d/l AVG free virus scan software, Microsoft Anti-Spyware, Adaware Anti-Spyware from the appropriate sites. (just google or yahoo them). If you have something like Nortons Anti-Virus laying around install that as well. Set all of those programs to auto-scan on different days at times you are sure you will be asleep, at work or at school. Also if you are using SP2 of XP make SURE you have the personal MS firewall ON. Its not a good replacement for an add on one but it's better than nothing.
Finally, stay away from off the wall sites and do not download and install ANYTHING without first scanning it fro spyware/adware/malware and of course viruses. If you are unsure about a site or program DONT GO THERE OR DOWNLOAD IT! Look for the most legitamate sites possible to download from as their servers will be fairly well protected from infect files.
There that should keep you hacker safe.
P.S. If you want to be really safe invest in a firewall. I like netgear personally but get w/e you want just make sure its a well known manufactureer.
P.S.S. Update your virus and spyware programs frequently. Alot of people get anti-virus software and the like but never update definitions and end up getting royally screwed because of it.
"One murder makes a villain, millions a hero. "
- Beilby Porteus, Death, A Poem