When you browse to www.example.com, here's what happens:
Your browser checks its cache. No result.
Your OS checks its cache. No result.
Your OS queries your configured DNS resolver (often your ISP's server).
The resolver checks its cache. If cached, it returns the answer. If not, it queries the DNS hierarchy.
The resolver returns the IP to your OS, which returns it to your browser.
Your browser connects to the IP.