A socket is an endpoint for network communication that enables data exchange between processes over a network. Sockets are identified by an IP address and port number and support various protocols such as TCP and UDP. They provide a programming interface for client-server communication. Example: A web browser using a TCP socket to connect to a web server.