I have purchased a game on Steam and can not find out the details of the file or purchase. How does one find their CD Key from a game purchased in Steam?
Most Steam games don't have any CD keys. Everything is attached to your account and can be downloaded and run inside the client, and most games require no extra verification - the Steam client itself is sufficient.
For the games that do have CD keys, right-click the game in your library and click View CD key.
This will show a dialog with your CD keys for the product (actual keys redacted here):
Steam will also show a reminder on the Steam Overlay when you launch the game, allowing you to access the keys from within the game. Here, you can also tell Steam to not show this reminder again (in case you already entered the key inside the game, or if the game doesn't actually use the key).
UPD: as steam updated their library interface again, my answer is no longer valid. Please refer to Powerlord's answer for the updated info.
In the eve of 2019 I couldn't find this setting in the context menus for some reason, but can see it currently present under Links category of a game: