Cryptography is a means to keep data secure and in a form that can be understood only by someone who has the key to decrypt the data that has been encrypted.
A key is basically a set of rules which are used to manipulate the values that form the data which is being worked on to convert them to a set of random values for someone who does not have access to the key. There are many forms of encryption techniques which are used. The method used initially required a private key which was the same for both encrypting as well as decrypting the data. The key had to be kept in a very secure location and this was a little difficult if the number of users sending encrypted data back and forth was large.
A new way of encryption which uses separate keys for encryption and decryption is in use now. This requires two keys. The key to encrypt the data is made available to all users who want to send information and is called a public key. The key to decrypt the encrypted data is called a private key and is required only by the user who is receiving the data. This makes it necessary to have just one copy of the private key and makes it easier to keep it secure.