If you really want to format your hard drive...
You can't... at least not while you're running Windows. You'll have to reboot from the Windows XP installation CD, because you can't format the drive on which Windows is running. But first you'll probably want to back up your hard drive, or at least part of it. For help with that, see Backing Up Your Files and explore the various options for backing up your personal files.
Okay, back to reformatting... when the install disk boots up, press ENTER at the "Welcome to Setup" screen. If prompted to do so, press F8 to agree to the license. Next, you’ll see a message asking if you want to repair your existing installtion. You don't, so press ESC to bypass the repair option.
Now select the partition where Windows is installed, then press D to delete it. Press L to confirm the delete. Okay, it's time to create and format a new partition. Select the unpartitioned space and press C to create a new partition. Allot the maximum amount of space available, then press Enter.
Now select the partition you’ve just created, and format it. Choose the NTFS option, go for the "quick format" then sit and wait. When the new partition is formatted, you're ready to (re)install Windows. Depending on your hardware, you may also need to re-install some software drivers to support a modem, router, printer or other devices. Make sure that you have the driver CDs handy in advance. Don't forget to reinstall your anti-virus and anti-spyware software, and be sure to visit Windows Update as soon as possible to ensure that you have all the latest security fixes.