Presumably you have set it up to boot from the CD. If not, you need to enter the BIOS. This normally means pressing a key, or combination of keys, immediately after switch-on. A message to this effect usually flashes up on the screen when you switch on, such as "To enter setup press Del". Other common BIOS codes are listed at click here.
When the BIOS screen appears you will see a set of menu options. Look for one labelled Boot or Startup and select the item Boot Order, or First Boot; this will be set to HD0, HD1 or the serial number of your hard disc drive.
Change the setting to read CD, CD-Rom or the serial number of your CD/DVD-Rom drive, Save the Change and Exit the BIOS.
Open the CD-Rom drive, insert your XP disk and restart your computer.
You will now see a screen message saying "Press any key to boot from CD", press the spacebar and a message appears informing you that "Set-up is inspecting your hardware configuration". This will be replaced by a blue screen, press Enter and you should see a "Welcome to Setup" menu, press Esc to continue; important, do not press R for Repair as this will start the Recovery Console.
The Windows Licence Agreement will now be displayed. Press F8 to signify acceptance and the next screen will list your operating system (usually just Windows XP). Select it and proceed to the next screen, which will have the option To Repair the Selected Windows installation press R. Hit the R key and the installation begins.
Windows Set-up will now go through what looks like a normal installation routine so be ready to respond to the prompts. When Set-up has finished, after a couple of restarts you should see your original desktop with all your shortcuts applications and programs.
You will need to go to the Windows Update site to get all of the critical patches.