SSL (Secure Sockets Layer), now replaced by TLS, is a security protocol that encrypts the connection between a user's browser and a web server. When you visit a secure website, the browser and server perform a "handshake" to verify the server’s identity using a digital certificate and agree on an encryption method. The browser then generates a secret key, encrypts it with the server’s public key, and sends it over. Both sides then use this shared key to encrypt and decrypt all further communication, ensuring privacy and data integrity during the session.