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.
When you type into your browser, the domain is split into parts by the “dot”, from right to left. The first part is “com”, so your computer checks the root zone file to see which registry manages the .com TLD. It then checks with this registry to see where the next part, “google”, points to. The registry returns the IP address, and your computer can then ask Google to send their homepage over.
There are numerous domain name registrars. Listed below are just a few, along with my comments, if I know anything about them. Note that the domain name industry is highly competitive, with prices wildly fluctuating throughout the year, every year, so it's impossible to really mention accurate prices below unless I spend all my time updating this page. Please check their sites for the latest rates. All prices below are in US dollars.
A domain name registration is simply reserving your website's name for a specified period of time. The two parties involved with a domain registration are generally the user who is registering the domain and the domain registrar. The domain registrant is the user who actually registers the domain name and the domain registrar is the company who helps that user with their domain registration.
Hostt is a just-launched free web hosting company that includes domain name purchasing and registration. They've a suite of offerings, such as one where you'll pay $13.99 per year for domain names with extensions that include .com, .net, .org, .us, .biz, and .info., but have unlimited bandwidth, web space, sub-domains, parked domains, sub-domains and email accounts, among other things. Like HostGator, they include domain locking and automatic renewal, along with a user-friendly management portal (which, believe me, is pretty rare) and 24/7 technical support. This isn't a bad price considering the amount you get, and their $3.95 and $5.95 a month packages both offer fairly balanced domain-inclusive packages.

If you're having trouble finding a domain name (whether because of crowding or cyber-squatters), check for a help facility on each registrar's site. Domain registrars typically house search engines that return a listing of available names similar to the one you want. When you search for a domain name at Namecheap, for example, you get both the status of that name and a list of suffixes available for that name. Maybe [Sitename].com isn't available, but [Sitename].biz or .org is.

Now it’s time to see if your domain name choices are available. Once you’ve come up with a few strong domain candidates, it’s time to plug them into Namecheap’s domain name search bar. We will search available domain names for you and let you know if your first choice of second-level domain or TLD is available. We’ll also suggest some alternate TLDs you might try if your first domain choice isn’t available.