In general, stick in the XP CD, reboot to boot from the CD (you may need to change some BIOS settings to make it boot from CD), and follow directions.
Many PCs however don't ship w/install media so you may only have a "recovery" disk or the installation files may be on the dead drive. If you can't find install media, you may have to spend an extra $90 on a new copy of XP Home OEM.
More info on what it is you have would be useful.
B