You'd have to look at your DNS server config, but assuming you don't have anything like forwarders set up, indeed you're correct that its the root hints file.
DNS is organized into a tree (sort of: for redundancy, nodes are duplicated; so, e.g., there are multiple root nodes). The root hints file tells the server where to find one of the root nameservers (once it finds one, it'll actually get a current list of root nameservers from the one it finds).
It'll then find out from one of the root nameservers a list of nameservers that are authoritative for the com zone. From one of those, it'll find out a list of nameservers authoritative for the google.com zone. From one of those, finally, it'll get the address (A) record for www.google.com. [Actually, www.google.com is a CNAME, but to the same zone, and surely the Google nameservers will return both records at once]
This process is obviously time-consuming, so a lot of caching is employed. There is a good chance that it already knew the address of www.google.com, and just returned it from cache. If not, it probably already knew to ask ns1.google.com, or failing that almost certainly knew where to ask about subdomains of com.
You can use the
dnstracer program to see this:
anthony@Zia:~$ dnstracer -4 -o -s . www.google.com
Tracing to www.google.com[a] via A.ROOT-SERVERS.NET, maximum of 3 retries
A.ROOT-SERVERS.NET [.] (188.8.131.52)
|\___ e.gtld-servers.net [com] (184.108.40.206)
| |\___ ns4.google.com [google.com] (220.127.116.11) Got authoritative answer [received type is cname]
| |\___ ns3.google.com [google.com] (18.104.22.168) Got authoritative answer [received type is cname]
| |\___ ns1.google.com [google.com] (22.214.171.124) Got authoritative answer [received type is cname]
| \___ ns2.google.com [google.com] (126.96.36.199) Got authoritative answer [received type is cname]
If you want to learn a lot more about DNS and in particular about how to use BIND, DNS and BIND, now in its 5th edition, is a good book. You can also pick up the ebook straight from O'Reilly.