WebSocket is a protocol that provides full-duplex communication channels over a single TCP connection. It allows for more efficient communication than HTTP by establishing persistent connections and enabling bidirectional data flow that enables real-time data transfer from server to client. The key advantages are lower latency for real-time applications like games, media streaming, and chats compared to HTTP. It works by upgrading the initial HTTP connection to a WebSocket connection using a handshake. Data is then sent between client and server as frames that include opcode, length and payload fields. Common uses include applications requiring constant updates from the server.