Encryption uses cryptography to securely transmit sensitive information over the internet. There are two main types: symmetric key encryption where both parties share a secret key, and public key encryption where each party has a public and private key to encrypt and decrypt messages. Public key encryption is more secure as it allows anyone to encrypt a message but only the intended recipient can decrypt it with their private key, making eavesdropping difficult.