ICANN publishes the complete list of TLD registries and domain name registrars. Registrant information associated with domain names is maintained in an online database accessible with the WHOIS protocol. For most of the 250 country code top-level domains (ccTLDs), the domain registries maintain the WHOIS (Registrant, name servers, expiration dates, etc.) information.
Getting a domain name involves registering the name you want with an organisation called ICANN through a domain name registrar. For example, if you choose a name like "example.com", you will have to go to a registrar, pay a registration fee that costs around US$10 to US$35 for that name. That will give you the right to the name for a year, and you will have to renew it annually for (usually) the same amount per annum.