A normal application asks the operating system's stub resolver, which consults local name-service policy and sends a recursive query to a configured resolver. The recursive resolver performs the hierarchy walk only when valid cache does not already answer the question.
DNS · Lesson 3
DNS Process
Learn how a stub and recursive resolver use cache, referrals, glue, and authority to answer a DNS query.