Ancestors had the necessity to transmit information that could not be shared with the rest of the people, although messages may be intercepted and that was the beginnings of cryptography.
Encryption: conversion of information from a readable state to apparent nonsense.
The cryptography literature often uses the names Alice and Bob, who want to transmit information that could not be translated even being intercepted by a third party, Eve.
Modern cryptography is based on mathematical theory and computer science, every cryptographic algorithm has the assumption that it could be broken. The priority lies in improving and making it harder to be broken.
Encryption in which the sender and the receiver share the same key, this was the oldest known in the modern era. This obviously has its cons and disadvantages: Mallory can intercept the decryption key.
Despite there are more modern, many companies are still using it such as in e-mails and secure remote access.
It is more sophisticated than the symmetric key because there is not the need to share the private key, thus, there is a new security protocol to protect the information.
Bob and everyone have a public key used to encrypt messages, although only Alice has got a key to decrypt the message. This method is unidirectional. Alice and Bob need one public and private key in order to communicate information between them.
It is the most popular cryptography algorithm nowadays and is used everywhere.