In more detail
A lookup passes through a recursive resolver, the root servers, the TLD servers and finally the domain's authoritative servers, and answers are cached for their TTL. DNS also stores the records that route email (MX record) and authenticate it (SPF, DKIM, DMARC).