Replace windows 7 with xp

On some units, you can't.
The firmware is written to prevent it.
Backup all your personal files FIRST.
Open the bios settings and set the CD to boot first.
Insert the XP disk, format the entire drive, and load XP.

But as I said, some newer computers are designed to prevent backtracking the OS.
I know people who have tried everything, and still can't do it.
 
Go into your bios and set the boot order to CD/DVD first. Get a valid copy of xp, and boot of the CD. You will be given the option to create/delete partitons. Delete your windows partition and any others you want and create a new partition for the new OS, then continue with the installation.

Be sure to backup your data first. Also, make sure you have all necessary drivers before you start the process.