DNS, which stands for Domain Name System, can be confusing. It's made up of many different elements which control different aspects of your domain name. In a nutshell, when a domain is registered, basic details are published to a WHOIS database and those details include the Name Servers.
When someone types in your domain name into a browser, the browser looks up the information it needs to reach the website. It first checks WHOIS to see which name servers to look up. Then, it looks up Name Server Records within and loads the website.