It resolves the domain to its IP address via DNS, then looks up that address against a public IP geolocation database to identify the hosting provider or network operator (ASN), the ISP, and an approximate city-level location. If you paste an IP address directly, the DNS step is skipped entirely.
Why this is useful for SEO work
Knowing what a site actually runs on helps explain things a page-level audit can't: whether a competitor is on a premium CDN versus shared hosting, whether a site migrated providers around the time its rankings moved, or whether several domains you're comparing are secretly hosted on the same infrastructure.
To see who holds the domain name itself, rather than who hosts the site, use the Domain Age Checker: it shows the registrar, the registration and expiry dates and the registry's name servers.