An URL is just an address, a reference. So here is how it is happening:
- the user enters the URL in the browser. This is handled by the keyboard driver that will send keyboard events to the browser, that will respond by updating the address bar with the typed characters
- the browser parse the URL in various parts as defined by RFC 3986
- the browser select the host part and it will use the internal resolver library to find the IP address. The most used resolver is DNS. For this the resolver library that is mapped inside the application will make a UDP request on port 53 on the DNS server configured for the client machine. The DNS server will search for the request in the internal cache and if it is expired or missing it will make a recursive request trying to find the address.
- the browser connects to the HTTP server on the default port (TCP/80).
- the browser sends a GET request and specifies also a HOST header as per HTTP/1.1 see RFC 2616
- the http server will parse the request and dispatch the request to the virtual host specified in the request
- the application return the generated content (usually a HTML) to the browser
This is a very very condensed explication. I do not speak about SSL, compression, language and character encoding negotiation, authentication, CGI, pipe-lining and keep-alives.