You can only upgrade from Windows Vista to Windows 7, it will not upgrade from XP.
If you insert a Windows 7 disk and run it from Windows in XP, it would require you to restart and also require you install a clean copy of Windows 7 and generally delete/overwrite the XP partition.
If done from Windows Vista, an upgrade check would be performed, and then rebooted and you are given the option to upgrade, or do a clean installation.
Generally a clean installation would be better, but upgrading shouldn't degrade performance much if at all if the system was in good working condition. Still, I always prefer a clean installation.
I tested inserting a Windows 7 DVD into my computer running Windows 7 Pro, I clicked install, it copied some files and then rebooted where I was given the option to upgrade or do a clean install. Hope that helps you.