How does this work?

wandering-eye checks WHOIS information on domains and IP addresses, along with geolocation data provided by MaxMind.

This isn’t foolproof; Providing WHOIS information is often required when purchasing a domain, but there are services such as WithheldForPrivacy which allow for this information to be redacted, swapped for their own generated information.