Recently, there was a question on Quora about DNS lookup or how does the browser ask for an IP address from a DNS server? Here is a brief explanation:
As soon as you type in the URL into your favorite browser and hit enter,
1. Browser cache is checked for an IP address of given URL
2. If there is no record in browser cache, then OS cache is checked
3. Then OS host file is checked which is located at %systemroot%\system32\drivers\etc\
4. Then router cache is checked
5. Finally, the request is received by a DNS server. First, it checks its cache for DNS record. If there is no entry in the cache, DNS performs a recursive search and try to resolve the query. When a query is resolved and an IP address is found, it is cached and passed back to the browser. The record is then cached at each step.