In cryptography, a key is a means of encrypting the message to make the cryptogram or of decrypting the cryptogram to retrieve the message. As a simple example, a cipher permutes the 26 letters of the alphabet and a key is a rule detailing this. This is an example of a private key, and a security issue with any such system is passing such keys between correspondents.
With public key cryptography, such as RSA, the means of encrypting messages is in the public domain. This way a company allows a customer to send in an encrypted order. However, if knowledge of how to encrypt is public knowledge, then in principle so is knowledge of how to decrypt. For example, if one were given one half of an English-French dictionary, it would be possible, given enough time, to reconstruct the French-English half. For this reason encrypting with public keys has to have a computationally difficult inverse—they are one-way functions—and public keys are frequently changed to avoid being decrypted.