If you are going to re-format your hard drive, make sure you have backups of everything you need and installation cds for everything you need, especially your Windows CD and your modem drivers with net connection software and your account details.
If you are really lucky, your pc will com with a reinstall disk that will do it all for you. But if not, to actually format your hard drive, one of the best ways is a full dos format. The method I use is (probably overkill
)
1: Use an old Windows 98 boot disk or cd to get to a proper dos prompt without loading windows.
2: type "format c:" and got through the process of saying yes to everything.
3: Type "fdisk" (you your windows CD if don't have it elsewhere) and delete your partition, then create a new one.
4: restart, type "format c:" again, just to make sure the partition is empty and clear
5: type "scandisk" to do a full dos scandisk which should find any bad sectors on your hard drive and either fix them or mark them so the hard drive will always ignore them
6: Restart the pc with the windows CD in the drive. It should boot off it and install, if not, press "Delete" whilst starting your pc to enter your bios and set primary boot device as CD-Rom
7: Proceed to install windows, then your modem and net connection software
8: Connect to net and download latest drivers for everything else
Note that if you are installing XP, its a very good idea to download and burn SP1 & 2 to a CD to install, as if you go online to download them with a pre sp2 copy of xp, chances are you'll be full of adwaqre and spyware before you've managed to download the updates that stop them
I am not taking any responsibility for if you try and do this though - its very easy to muck it up
Good luck