I assume the computer is a laptop, a laptop drive will not work with a desktop computer the plugs are different.
For XP you will need at least:
Processor speed 1GHz
(500 -600 MHz passable if no music or video is to be played)
Memory 128 GB RAM
If the computer supports the old hard drive and it works you can use it. If the drive had a Virus on it you might want to run a special program that will wipe the drive (erase everything) before you install XP.
-------------------------------------------
Any of the following three methods should wipe the drive. You will need to install on a floppy disc if you can't boot from the CD drive. If you can boot from the CD drive, install it on a CD or floppy disc.
http://forums.cnet.com/5208-6142_102-0.html?forumID=5&threadID=194873&messageID=2115918
"You can find out the manufacturer of your HD and then attempt to download the formatting tool created by that manufacturer for their HD's. Most HD Manufacturers have a Zero Fill Low level formatting tool available to erase their HD products. This will clean any existing OS files from your system as well as any viruses other files etc.”
Darik's Boot and Nuke (DBAN)
http://www.download.com/Darik-s-Boot-and-Nuke/3000-2092_4-10165154.html
http://sourceforge.net/project/showfiles.php?group_id=61951&package_id=58479&release_id=439240
DBAN will automatically and completely delete the contents of any hard disk that it can detect, which makes it an appropriate utility for bulk or emergency data destruction.
Active@ Kill Disk - Hard Drive Eraser (Free version/ $29.95 enhanced version)
http://www.killdisk.com/
Active@ KillDisk - Hard Drive Eraser is powerful and compact DOS software that allows you to destroy all data on hard and floppy drives completely, excluding any possibility of future recovery of deleted files and folders. It's a hard drive and partition eraser utility.
---------------------------------------------------------
If your computer will not boot from the CD-ROM, you will need to either upgrade the BIOS to boot from the CD or make Windows XP setup floppy boot disks.
Windows XP Home Edition Utility: Setup Disks for Floppy Boot Install
http://www.microsoft.com/downloads/details.aspx?displaylang=en&familyid=e8fe6868-6e4f-471c-b455-bd5afee126d8
The Windows XP startup disk allows computers without a bootable CD-ROM to perform a new installation of the operating system. The Windows XP startup disk will automatically load the correct drivers to gain access to the CD-ROM drive and start a new installation of Setup.
How to obtain Windows XP Setup boot disks
http://support.microsoft.com/kb/310994
Floppy Boot Install of XP Procedure
1) Install CD-ROM Drive, make sure it works
2) Make floppy boot disks.
3) Insert XP install Disk in CD Drive
4) Insert floppy boot disks and start computer. The boot disks should load the drivers for the CD drive allowing it to read the XP CD.
5) At this point CD should read XP disc.
6) Format drive
7) Create only one partition on drive
8) Install XP
If you can boot from the CD
Reformat and install From a CD
(Read procedure for either install method required)
http://www.microsoft.com/windowsxp/using/setup/winxp/install.mspx
http://support.microsoft.com/kb/313348
USB, LAN, Modem, Video, Sound
Windows XP may find and install all the drivers to get the above devices to run. It is best to determine the make and model of the video, and anything else that does not work after installing XP and to go to the manufacturer's site and look for the XP drivers in the manufacturer's support area and download and install them.
To find the make and models run “BelarcAdvisor”
http://www.belarc.com/free_download.html
How to Build a Computer
Step by step instructions with pictures text and video.
http://computer.howstuffworks.com/build-a-computer.htm
Hard Drives Installation + Jumper settings
http://www.harddriveupgrade.com/jumper_pins.shtml
http://www.helpwithpcs.com/upgrading/install-hard-drive.htm
CD or DVD Installation + Jumper settings
http://forums.afterdawn.com/thread_view.cfm/461258
http://reviews.cnet.com/4520-6603_7-5118840-1.html
For issues related to disk capacity. Read
http://www.dewassoc.com/kbase/hard_drives/hard_drive_size_barriers.htm