The thing to understand here is that DNS resolution involves a distributed network of caches.
As others have said, routers targeted at the home or small office typically have a DNS server built in. Most such routers run the Linux operating system, and most of those use dnsmasq to provide DNS service.
These typically operate in forwarding mode, though there may be an option to operate in recursive mode.
In either case, the servers maintain a local cache. If a query is cached, and the entry is valid, they return the cached value.
They differ in how they act when they don't have a valid cached entry. In that case, both forwarding and recursive mode servers consult another DNS server looking for the answer, but each uses a different strategy.
A forwarding DNS server will query one of the DNS servers it's been configured to use. The result of that query will be returned to the client and cached.
A recursive DNS server will instead do a series of queries. It will first consult one of the root servers. These servers can't resolve the fully qualified domain name, but they can direct the recursive server to servers that is in a better position to. So, the recursive server ask the root servers for a list of servers that can answer responses for the relevant top-level domain (ie .com, .org, .uk...). Once it has an answer, it queries one of them to find the nameservers that can answer questions about the domain (ie superuser). It then makes a request of google's nameservers to get the IP address of the hostname (ie www, or the root of the domain).
This chain of queries isn't necessarily triggered by each DNS reqeuest because the results of each query, at every level, are cached. Queries for the .com nameservers, for example, are cached for a day.
The point being, DNS is caches all the way down.