The purpose of cryptography is to make data storage and transmission secure.
All modern ciphers use keys together with plain text as the input to produce cipher text.
The same or a different key is supplied to the decryption function to recover plain text from cipher text. The details of a cryptographic algorithm are usually made public. It is in the key that the security of a modern cipher lies, not in the details of the cipher. In symmetric, or conventional, cryptography, the same key is used for both encryption and decryption. Symmetric cryptographic algorithms require that both the sender and receiver agree on a key before they can communicate securely.