This quesion is probably the #1 answered question here.
CD key = online key.
For store copies CD key is on back of booklet.
Digital copies vary, but Steam does a good job of notifying you of your key and usuallyasks if you wanna copy it to your clipboard for easy entry later.