The way I do it is:
Make a List of what is currently on the computer (hardware and software) and make sure I have all the relevant discs for the Drivers/Installation of these...
Back-up all: Documents, Photos, Music, Email's, Browser Favorites (I use MozBack for Firefox!) and put this in a safe place!!..
Unplug all external items that don't need to be seen during the install (Printers, External Drives etc...)
Pop the XP CD into the Drive and Re-Boot..
Chose the 'Full Format' not the 'Low level' one!..
follow all the on-screen prompts for the install. All the relevant hardware will be installed if Windows has drivers for it (HD, CD/DVD etc...)
once into Windows and you've Authorised it (either over modem or Phone), install the Motherboard drivers (just work down the list on the disc), then work through all the other peices of hardware (Printer, external drives etc..). You may need to re-boot quite a number of times!..
If you use a Router to connect to t'interweb it will remember the config for you!.. you only need to re-connect it to the network port - NO DRIVERS NEEDED (windows would have already installed the Network Card for you!!).
Then spend the next day (well a few hours) installing all your Hardware/software (don't forget a decent virus scanner!!) and customising you'r PC back to how you had it before (hopefully without the virus/malware that caused the problem!)..
Let Windows Update do its stuff also!.. and do Re-boot when ever prompted (unless you halfway through doing summut else!!)
Then restore all your backed up files...
Last time I did it it took me about 4 hours (total) to get it back to how I like it!!...
Good luck and have fun Tonight!!!