Encryption works by using algorithms and keys to secure digital information during transmission. Symmetric-key encryption uses the same secret key between two computers, while public-key encryption uses separate public and private keys. A popular implementation of public-key encryption is Secure Sockets Layer (SSL) and its successor Transport Layer Security (TLS), which allow for secure transmission of sensitive information on the internet through the use of encryption during online transactions.