If the old PC came with preinstalled Windows 7 then you can reinstall it as often as you want and in any way you want for the life of the PC. Everything you need is here:
Clean Reinstall - Factory OEM Windows 7
Unless you want to move a Retail Windows 7 from old to new, you'll have to buy a new copy of Windows 7 for the new build, but you can get a price break on System Builder OEM.
If the current OS is the same version and the moved HD won't start on the new PC, move it back to the old hardware to
SysPrep to move HD to another computer. Then after it starts up and changes out all the
drivers, change the Product Key to the newly purchased OEM copy in Control Panel>System.