Q:

If The guy who built my computer installed an illegal copy of vista. Can i upgrade to a legit copy of windows 7

Answer

Yes of course, but you will have to wipe the system and do a clean install of Windows 7, not just an upgrade.