Definition
Encryption is a technique that uses a special rule to scramble ordinary, readable text or data into gibberish. Without the right key to unlock it, nobody who peeks at or intercepts the scrambled data can tell what it says.
A Secret Diary and a Code Box
When you were a kid, you may have passed secret notes to a friend by shifting every letter one step forward. Write B for A and C for B, and anyone who didn't know your private rule couldn't read the note, even if they picked it up.
Protecting information in the digital world works the same way. The photos and messages you send to friends, or the account PIN you type into a banking app, get mixed into random-looking nonsense that nobody else can read. That process is encryption.
Turning the scrambled data back into the original is called decryption, or unscrambling. Only someone who has the secret rule, or the key that opens the lock, can turn the jumble back into normal text.
A bit more precisely: symmetric and public keys
The locks we use at home open with the same key that locked them. In computing, this is called symmetric-key encryption. It's very fast, but it has a serious weakness: it's hard to hand the key to someone far away in secret. If the delivery person peeks at the key, it's over.
So computer science came up with a clever fix. It uses two different keys, one to lock and one to unlock. This is called asymmetric, or public-key, encryption. You lock the box with a padlock (the public key) that anyone can have, and only the one true key (the private key), which only you hold, can open it.
Today, online banking and secure website connections smartly combine both methods. They use public-key encryption to safely share a symmetric key, then use the fast symmetric key to encrypt the large amounts of real data.
A Digital Shield Working Behind the Scenes
If a web address starts with "https://" (some browsers also show a padlock icon), that's a sign the connection is encrypted. But it only means the connection is encrypted. It's not a guarantee that you can trust the site. Without encryption, a hacker nearby on a coffee shop's public Wi-Fi could see your username, password, and card number as easily as watching a screen.
The "end-to-end encryption" used by some messaging apps is very strong, too. A message is locked the moment it leaves your phone and unlocked only when it reaches your friend's phone. It's designed so that even the company running the app or its server admins can't peek at your conversation in the middle. It can't hide who talked to whom and when, though, and it can't help if either phone itself is hacked.
Photos and contacts stored on your smartphone are also kept encrypted, along with the whole storage drive. If you lose your phone and nobody can get past your passcode or biometric lock, then even prying the data out of the chip gives them only a heap of meaningless numbers.
Common misconceptions
If you just set a hard password, your data is automatically safe.
A password is only a gatekeeper that checks who you are. If the data itself isn't encrypted and travels as plain text, a hacker can intercept it in transit and read it as is.
Where you meet it
When a web address starts with "https://" (a padlock icon in some browsers), what you send and receive is encrypted and protected.
Some messaging apps, such as WhatsApp and Signal, apply end-to-end encryption to every conversation. Other apps use it only in a separately chosen "secret chat" mode, not in regular chats.
Even if you pull the memory chip out of a lost smartphone and plug it into another device, encryption keeps the files unreadable.
In one sentence
Encryption protects valuable information by scrambling it so it can't be read without a key.