Localhost name resolving to an address, and TCP port number, were covered. I didn't cover: how various servers handle listing to port, server pools handle multiple connections, how to configure web-servers, the inner workings of TCP communications, full HTTP headers explanation, or how name resolution works for domains not found in hosts file, each would be far beyond the scope of the question.