WHOIS is a protocol and a service of the same name that let you find out who registered a domain and retrieve its key details: the registrant, the registrar, the creation and expiry dates, and the nameservers.
A WHOIS query reaches the database of a registrar or the registry of a top-level domain and returns information about a single name: the owner's contacts, the registration and renewal dates, the domain's status codes and its assigned name servers. Historically this data was fully public and helped people reach domain administrators.
Today personal data is increasingly hidden:
Checking WHOIS is useful before buying a domain — it shows whether the name is free and when the current registration expires.