aletank is basically correct but his first couple of steps might be a little confusing.
Just put the XP CD in your CD drive, reboot your computer, when it restarts go into setup (on most systems you press Delete right after it completes the POST (Power On Self Test, that is the beep that you hear) and change the boot sequence to boot from the CD drive first. Save the changes and exit.
The computer will restart and shortly at the bottom of your screen you will get a promt that says "Press any key to boot to the CD". Press any key fairly quickly, it will only give you 3-5 seconds before it will continue to the next boot device. When you press any key it will boot to the XP CD and load the files that XP needs to do the install.
After XP finishes loading the files you will be given two options, you can press R to go to the Recovery Console or I believe it is press F8 to install windows. When you press the key to install windows it will give you multiple options for installing. To do a clean install just have it format your drive (or partition) and do a clean install. At some point during this process it will ask you to put in a CD from a qualifying product (either Win98 or Win2K). Just put the 98 or 2K CD in when it asks for it, it will check to make sure that you do have a qualifying product and then continue with the install.
BTW, this is by far the best way to do any installation of XP.