Encryption works by converting data into an encoded format using mathematical algorithms and encryption keys. This protects sensitive information from unauthorized access during transmission or storage. Common types of encryption include ciphers which use a grid-based system to substitute letters, and more modern methods like RSA which use prime numbers for strong encryption important for banking, commerce, and communications. The latest developments provide public key encryption for easy usability with strong security.