SSL works by using a combination of asymmetric and symmetric encryption to establish a secure connection. When a client connects to a server, an SSL handshake process occurs, where the server presents a digital certificate to the client. This certificate contains the server's public key, which the client uses to encrypt a session key. The session key is then used for symmetric encryption, ensuring fast and secure data transfer.