There are organizations that are called registries that manage each TLD option. When you register domain names, you would first visit a domain registrar who would in turn check with the registry that manages that TLD to see if the domain is available. If the domain for the TLD you want discovers that it is in fact available, the registry adds it to their registry and gives you access to it. If the domain has already been registered by another user for that TLD, you will be shown during the domain registration process that the domain isn't available.
If you ever change your web host (the actual physical location of your website files), your domain name goes with you. Your regular visitors or customers who knew your site name as (say) www.thesitewizard.com would not have to be informed about a change of web address (also known as "URL"), since as far as they are concerned, the site is still at the same place. They would simply type your domain name and they'd be transparently brought to your new location.
Your domain name is how visitors easily find you online. It is often the first step in getting your website started because it is like establishing your website’s street address on the internet. If you did not have a domain name, you would have to give out your IP address to everyone who wanted to visit your website, which would get confusing and be easily forgotten.
A handful of domains will have restrictions on them, which means you can only purchase them if you meet certain criteria or have authorization (some examples are .gov, .edu. and .mil). But most extensions are available to everyone. In fact, most country code Top Level Domains (ccTLDs) are available for anyone to purchase, even if you don’t reside in the country in question.
What’s easy to forget, though, is that Verisign have managed .com for the past 20 years without so much as a hiccup of disruption or downtime, and that there’s no guarantee that a more democratic or competitive process would have resulted in the 2 decades of .com stability that we’ve enjoyed. Internet governance is obviously important, but we should remember that the overwhelming majority of users don’t know or care what’s going on behind the scenes.