Did your computer come with a "Restore Disk"?
That's the one you'd want. Put it in, restart computer. When comp comes back up it will ask to restore your hard drive to factory settings or to format disk.
You sure you need to format/restore your computer? You'll lose everything.
If you have the windows disk, put it in and restart the PC. When its loading at the start the disk will make a noise and your screen will say "press any key to boot disk" press any key and a blue screen came up. You'll need to follow the instructions, making sure you delete your current harddrive - that was the hardest part for me coz i was Id fuck everything up. After that windows should install and u follow the easy instructions.
Make sure u back up any files you really want, everything gets lost
Make sure you know the XP activation code before you start. There should be a sticker on the computer somewhere with the number on it. The CD will reinstall Windows from scratch. It will give you the option to format the drive first, if you've had a lot of stuff on it you should do that.