Wise move.
Here is a check list of items that you will need for a reformat.
1 - Backup Your Data
Copy all your data to a separate drive, CD, DVD, etc.
It may be a good idea to check the files that you backup with an online scanner, you don't want to be reinfected.
http://www.kaspersky.com/virusscanner
2 - Back Up Your Drivers
Particularly important if your computer was not delivered with driver CDs
Driver Genius Pro finds updates and backs up your drivers into an exe installer - very simple to re-install
Or there's the free DriverMax from http://www.innovative-sol.com
3 - Download Programs, Installers, and Updates
Make sure you have all the programs you will need to re-install such as an Antivirus, a Firewall, and, if not included on the installation disk, Microsoft's Service Pack 2 for Windows XP.
Take note of all the product keys and serial numbers. These may be on boxes, CDs, or in emails.
4 - Make Sure You Can Get Back Online
Check that you have modem drivers, set up instructions, and log-in details.
5 - Boot From The Windows CD and Install
Physically disconnect your internet cable between the computer and the modem/router
If your computer isn't set to boot from CD, look for the option to enter the BIOS setup during startup - usually Del, F1 or F2
In the BIOS, look for the option to change the order of boot devices
Select the CD drive as the first option
Save and exit
6 - Reload Drivers
Once the Windows installation is complete, re-load the drivers you save in 2 above
7 - Install Security Programs
Install your Antivirus, Firewall, and other security programs
8 - Install Any Microsoft Updates
Reconnect your computer to the internet and go to the Microsoft Updates site: http://update.microsoft.com/microsoftupdate
Download and install any required updates
9 - Install Any Programs
Finally, install any programs you need to run
If you have any questions, don't hesitate to ask.