SSL provides authentication and confidentiality for web communications. It operates at the transport layer, encrypting data between the application and transport layers. The SSL handshake protocol establishes a secure connection in 4 phases: establishing capabilities, server authentication and key exchange, client authentication and key exchange, and finishing. The record protocol then encrypts and integrity checks data sent over the secure connection, while the alert protocol closes the connection if an error is detected.