You purchase your domain name from a provider (we’ll your technically renting it). This will be the common entry point for people to access your site.
All the files of your website will sit on a website hosting server. This is often different from the servers of your domain name.
Once you have your domain name and your website hosting ready, it’s a matter of connecting your domain name to your website hosting. This is done via something called your domain name servers. Essentially, you tell your domain name to point to your website hosting servers . So, everytime someone clicks on your domain name – it knows to forward these users to your website that is sitting on your hosting server.