Your "installation" is tied to a "configuration. Windows generates an installation number which is generated from a combination of hardware and software numbers.
When this number changes or the hardware changes it checks certain things to make sure its still installed on the same machine.
If you replace a hard drive and install Windows using your old cd key you shouldn't have any issues other than a possible lockout if you install it like 20x in a day.
If you are using like an hp recovery cd that activation is tied to a string in the bios of that board. Restore it as many times as you wish as long as its on that board.
How do you remove a windows key?
Basically by formatting the disk. What MS sees is so many "keys" active at 1 time and if they see multiple keys active they may block further activations until you call them to prevent piracy of the OS.