So, there's two mainstream options. VMWare Player that you can get here
, or VirtualBox which you can get here
. I typically use VMWare player so that's what I'll walk you through.
1. Install VMWare Player and restart the PC.
2. Launch VMWare player and select "Create a New Virtual Machine"
3. Insert the Windows XP CD and it should recognize that disk on the next window to pop-up. Click next once it does.
4. Fill out the Product Key, Full Name, and password. Click next
5. Here you can name the Machine (Default is OS name) and set the default location. Change the default location! Change it to be housed on a different drive, preferably on a data drive (Data Partition/Drive, USB Mass storage (Not preferred)). The reason you want to put it on a secondary drive is if you ever reformat, your Virtual Machine is not lost and it's good habit to save data on secondary drives.
Click next once you find a good name/save location.
6. Now you will select the size of the Virtual OS' main drive. The default is 40GB but the virtual drive will not be that large on your physical drive. It's an expanding virtual disk so while Windows XP will recognize a full 40GB (or however large you select), the Virtual Machine's footprint on your HDD will only be as large as the data housed inside the Virtual Machine.
Leave the Radio button marked on "Store virtual disk as a single file"
7. This is the "Summary" Page, but you'll probably want to add some more RAM to the VM.
Click "Customize Hardware"
8. Select Memory and set that to 1GB or whatever you would like.
9. Click Ok which will take you back to the Summary screen. Click Finish to start the VM up. Now install WinXP like you would on a new machine.