Following a query from your keyboard to an IP address
Before learning what DNS records contain, it helps to understand how a query travels through the system. There are four distinct actors involved in resolving a name you've never looked up before.
1. The Recursive Resolver (your ISP's or a public one like 8.8.8.8)
This is the server your computer talks to directly. It does the legwork of chasing down the answer on your behalf. When you query it, it either returns a cached answer immediately or begins a chain of queries to find the answer.
2. The Root Name Servers
There are 13 logical root server addresses (labeled a.root-servers.net through m.root-servers.net), operated by different organizations worldwide. They don't know the IP for google.com, but they know which servers are responsible for .com. They respond with a referral.
3. The TLD Name Server (Top-Level Domain)
The .com TLD server doesn't know the IP for google.com either, but it knows which name servers are authoritative for google.com specifically. It responds with another referral.
4. The Authoritative Name Server
This server is the final source of truth. It holds the actual DNS records for google.com and returns the definitive answer — the IP address.
Here is the full sequence for a first-time lookup of google.com:
Client → Recursive Resolver: "What is google.com?"
Recursive Resolver → Root Server: "What is google.com?"
Root Server → Recursive Resolver: "I don't know, but ask the .com TLD server at 192.5.6.30"
Recursive Resolver → .com TLD Server: "What is google.com?"
TLD Server → Recursive Resolver: "I don't know, but ask Google's NS at 216.239.32.10"
Recursive Resolver → Google's Authoritative NS: "What is google.com?"
Authoritative NS → Recursive Resolver: "It's 142.250.190.78, TTL 300"
Recursive Resolver → Client: "It's 142.250.190.78" (and caches it for 300 seconds)
The key insight is that the recursive resolver shields your computer from this complexity. Your computer asks one question and gets one answer. The resolver handles all the intermediate steps and caches results so subsequent queries for the same name are answered instantly from memory.