A top-level domain (TLD) is the right-most part of a domain name. Some of the most common TLDs are .com, .net., and .gov.
In the hierarchy of the domain name system (DNS) the top-level domain is just that, at the top. These domains are generally maintained by IANA, a part of ICANN. You can think of each TLD as having its own tree or registry. For example, menandmice.com will not take you to the same place as menandmice.net because they are in two totally different hierarchies.
The TLD is a part of the domain name. The domain name is part of a URL, sometimes referred to as a web address, as shown in the image at the top of this article. There is a difference when referring to TLDs on the public Internet, as opposed to if someone were to name their internal domain example.com. Internally this name would not be controlled by associations such as ICANN or IANA unless these domains were to be registered with ICANN and used publicly as well.
When a client tries to access a particular URL, it will first check with the DNS server that it’s been assigned to check with. If it doesn’t find the DNS entry there, it will go to the next DNS server, sometimes the secondary DNS server. If it’s not found there, it will go to the next until it eventually finds the information with the top-level DNS server. This information will then be cached for a period of time so that it’s easier to find.