Crytography is a means to keep data secure and in a form that can be understood only by someone who has the key to decrypt tha 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 covert them to as et of random values for someone who does not have access to the key.The method used initially required a private key which was the same for both encrypting as well as decrypting the data.
A new way of encryption which uses seperate keys for encryption which uses seperate keys for encryption and decryption is in use now.