If it's the same version of Windows 7 then you can just enter the key. If it's a different version then you have to reinstall.
go to the start menu, then at the botton type "system" with out the quotations of course. then it will open a windows and at the bottom it will say something like"windows is not activated" and there should be a spot to put in the key