You just stop using it on the old box and install on the new box.
Where some run into trouble is with the limited licenses you find on HP/Dell/Sony/other machines. Those OSes have a limited license that keeps the OS only on that machine. Part of the lower price of that copy is due to this license.
Sadly you didn't reveal your exact version so I can't tell if you'll have any issue.
I have had troubles with this PC, having to install a new hard drive and purchased a genuine copy XP professional, which I loaded on and registered with Microsoft.
If I now want to scrap this PC and build/buy a new one how do I cancel the registration for this one and register with Microsoft a product that has already been registered?