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.
GoDaddy — This extremely popular registrar (probably the biggest today) offers .com domain names for $9.99 (plus 20 cents) per year (or $6.99 plus 20 cents if you transfer from another registrar). They have a web interface to manage your domains, free web redirection (where people who visit your domain will get transferred to another web address of your choice), free starter web page, free parked page or free "for sale" page, and an optional private domain registration where your domain is registered in the name of a proxy company. Besides .com, they also sell .us, .biz, .info, .net, .org, .ws, .name, .tv, .co.uk, .me.uk and .org.uk, etc. Note that (as with all registrars) the exact price varies depending on which domain you are registering (for example some domain suffixes are more expensive than others). Both credit card and PayPal payments are accepted.
Domain names were created to make IP addresses easy to remember. Every computer has an IP address assigned to it – much like a street address. But instead of having to memorize each IP address number, we assign domain names to these numbers so we can easily remember them. The domain name system, or DNS, takes domain names and translates them into their IP addresses so that computers can communicate with one another. When you enter a domain name into your web browser, the browser simply uses that domain to locate its corresponding IP address and then shows you the website associated with it. If you own a business, GoDaddy can help you find a domain name that best suits the business so you can easily promote your website.