A socket is an interface between the application layer and transport layer within a host. It allows for identification through a hostel name + room number or IP address + port number. The listen() function converts a socket to a passive socket and specifies the maximum number of connections the kernel should queue in incomplete and complete connection queues. Accept() retrieves completed connections from the completed connection queue.