If you are using steam, right click the game in your library and you should be able to select "view game key", or something to that effect.
Alternatively, Game keys are usually stored in the registry (start->run->regedit)
under Hkey_Local_machine\Software\<Publisher name>\<game name> (should be recognizable under one of the keys from there).
Don't change anything in the registry though unless you understand the risks. Some games will detect that you've edited your game key and stop functioning correctly.
When you enter a CD Key it often gets changed into a different game code key that is stored on the comp. So what you see in the registry is not the CD key. This way people can not steal your game key by looking through the computer files. Using the stored key will not work either. The stealing or improper use of software is not supported in these forums.