True bidirectional, persistent
WebSocket is what you reach for when both sides need to send messages frequently and asynchronously. Once the connection is established, either end can write at any moment. There is no concept of a "request" or "response" — there are just frames flowing in both directions over a single TCP connection that stays open until somebody closes it.
The upgrade handshake
WebSocket starts life as an HTTP/1.1 GET with special headers. The server responds with 101 Switching Protocols and the same socket stops speaking HTTP. From that moment on, the bytes on the wire are WebSocket frames defined by RFC 6455.
ws:// vs wss://
ws:// is unencrypted (port 80 by default), wss:// is TLS-wrapped (port 443). In production you use wss:// always. Many proxies and corporate firewalls outright drop unencrypted WebSocket. Even ignoring policy, you do not want chat or auth tokens crossing the wire in cleartext.