Some apps/games store the key in the registry, go to Run, type regedit and hit enter, find the thing you want under current_user or local_machine.
Others won't let you change your key because most people who do are thieving little gits.
Is it a Windows (operating system) CD key or just a smaller prog that you use? Often if you run the prog and click on "Help" in the toolbar, you get an option to enter a new key/serial.
If it's Windows I think you may have to reinstall, unless you can get all technical in the registry.