Technically WHOIS is very simple: a client opens a TCP connection to port 43 of a WHOIS server, sends the domain name, and receives plain text. There is no standard format, so each registry and registrar lays out its answer differently, which makes WHOIS hard to parse reliably. For some TLDs the registry answer is "thin" and only points to the registrar's WHOIS server, where the fuller record is kept.
A typical record shows the sponsoring registrar, creation, update and expiry dates, EPP status codes and nameservers. Contact details for the registrant used to be public, but since 2018 they are largely redacted in gTLD output because of data-protection law, and many ccTLD registries hide the data of private individuals as well.
RDAP is the structured successor to WHOIS, and gTLD registries are now only required to offer RDAP. Many country-code registries still run WHOIS only. OrbitProbe queries RDAP first and falls back to port-43 WHOIS where no RDAP service is published, reading only registrar, dates, status and nameservers.
Example
Domain Name: EXAMPLE.COM
Registrar: Example Registrar, Inc.
Creation Date: 1995-08-14T04:00:00Z
Registry Expiry Date: 2027-08-13T04:00:00Z
Domain Status: clientTransferProhibited
Name Server: NS1.DNS-HOST.EXAMPLE