After buying a domain, you set DNS records that say where it points. A points to an IPv4 address, AAAA to IPv6, CNAME to another name, MX to a mail server and TXT holds verification text.
example.com. A 203.0.113.10 www.example.com. CNAME example.com. example.com. MX 10 mail.example.com. dig example.com A +short # check what the world sees