I assuming you installed windows XP after windows 7 and now only XP boots up. After you reach the desktop of XP , insert the windows 7 DVD to the optical drive.
Go to command prompt by typing CMD at the run option and go to the drive letter of your optical drive. assuming it as E:
now move to the folder named boot by typing cd boot , and type the following command
bootsect.exe /nt60 all
Now the boot sector for windows 7 is fixed . Reboot and you can see that machine will boot to windows 7. Now our aim is to create a multi boot environment where windows 7 and windows XP can co exist.
To achieve it you have to edit the boot sector with BCDEdit option . There are so many thirdparty software available to do this task but you follow the official way from Microsoft.
I assume you now booted up your windows 7 and it is working fine. Now start your command prompt with administrative privileges . For that go to
All programs –> Accessories –> right click on command prompt and select run as Administrator