How Does Domain Name works?

What happens when you enter a domain name in your browser?

Parts

Different Parts of a Domain Name   

When you enter a domain name (medium.com) in your web browser

The DNS resolver from your computer sends a request to a global network of servers that form the Domain Name System (DNS).

Root-level, top-level and second-level domain servers

These servers then lookup for the name servers associated with the domain and forward the request to those name servers. These servers are computers managed by your hosting company.

Hosting company

Your hosting company will forward your request to the computer where your website is stored. This computer is called a web server.  The web server now retrieves the web page and pieces of information associated with it then sends this data back to the browser.