Whois directories gather all the registered domain names in a given country together into a giant database. These databases, organised by country, can be searched through to locate details about any domain name in that country.
Whois databases contain information about the website owner and their contact details, as well as the dates that the domain was purchased and renewed. This is important for those looking to purchase a domain name from another individual or company, for instance.
Some domain owners decide to pay registrars to keep some of their details off Whois directories in the interests of privacy.