People remember names more easily than numbers, but internet routers move data using IP addresses. The Domain Name System (DNS) connects the two: it helps a browser find the network address associated with a domain name.
Resolvers follow a trail
When you request a domain, your device usually asks a recursive DNS resolver. If the resolver does not already have a valid cached answer, it can ask a root name server where to find the domain's top-level domain servers, then ask those servers for the domain's authoritative name servers. The authoritative server returns the record for the requested name.
Records carry different answers
An A record maps a name to an IPv4 address; an AAAA record maps it to IPv6. Other records support mail routing, aliases, and verification. DNS answers have a time-to-live (TTL), which tells caches how long the information can be reused.
Why caching matters
Caching makes repeat lookups faster and reduces work for DNS servers. During a domain migration, old cached records may remain until their TTL expires, which is why DNS changes can take time to appear everywhere.
DNS translates names to addresses, but it does not itself establish a web connection or encrypt its contents. Those are handled by later network steps.