A domain name provides a sort of address for your website. When you purchase a domain name and point it to your web hosting (which you can learn more about here), visitors can find your site by typing the domain name into the address bar of any web browser.
Sometimes people refer to a domain name as a URL (which stands for Uniform Resource Locator) or web address.
Think of it this way: the domain name is the address, the web hosting is the office or store space you are renting, and the files are what you fill that space with.
Easier website addresses were the goal behind domains. We needed to create an easier way to remember website locations. Prior to them, we accessed websites using IP, or Internet Protocol, addresses. Those are a string of numbers like a phone number to identify your web hosting server.
Where do Domain Names come from?
Usually the website owner purchases a domain name for one year at a time from a seller like Namecheap.
A non-profit called ICANN (Internet Corporation for Assigned Names) oversees the domain name system (or DNS). ICANN maintains the database of domain names. Their role includes managing the DNS and allowing registrars and resellers to sell Domain Names to customers like you.
Why do some Domains have .com and others end in something else?
The most common extensions (or endings) for domain names are .com, .net, and .org. Sometimes we refer to these as TLDs (Top-Level Domains). Originally, these extensions had specific purposes. For example .com signified businesses, .net for networks, and .org for organizations.
Over the years, ICANN has allowed other extensions in the database.
For example, I use .studio at the end of mine. There are many possible extensions for domains, which you can explore over at Namecheap when you search domains. Just type in a name (without an extension) and see what your options are.
One caveat when selecting a less common domain extension: there are still people out there who will add .com at the end of everything, which means they might land on the wrong website or get an error. So when writing your website address, make it abundantly clear what it is, and be aware that unusual extensions may confuse people. As these extensions become more commonplace, this will be less of an issue.
The database contains other domain extensions reserved for specific companies, industries, or organizations. For example, .edu is only for schools and they reserved .gov for official government websites.