You cannot move Windows from one PC to a different one by moving the hard drive it's installed on. In any event, with a factory-built PC the OS is not transferable. That copy of Windows is tied to that PC forever. When the PC is scrapped, so is the OS that's installed on it.
So you do need to buy a new copy of Windows 7 (if you can find one, Microsoft started collecting all unsold copies from vendors 5 weeks ago to make Windows 8 sell better). Buying it online may be the best option, but buy it only from a trusted supplier to avoid rip-offs with pirated stuff.
Boot from the Windows 7 DVD, select the partition where Windows 7 is currently installed, then select "Format" from the choices that appear. That will erase the old Windows installation and everything else that's on that partition.
When formatting is completed, install Windows on to that same partition you just formatted.