....
[0] This is part of the libc and (roughly) translates host names to
IP addresses for the programs running in your box. Eventually,
it goes out to ask some DNS servers.
Along the way it's (probably) consulting /etc/resolv.conf which is where the "resolver" gets most of its own config information. Such as how to "assume" the network name given only a hostname, and the order in which DNS servers should be queried and their names or network addresses.
Then there's /etc/nsswitch.conf as already described below, that stands for "name-service switch". Originally a sort-of meta-config for name resolution, later other random configuration gunk got included there :-)
[1] Some of those stars live in /etc/nsswitch.conf. Mine has, among
others:
hosts: files mdns4_minimal [NOTFOUND=return] dns
meaning that to resolve a host, you first look into /etc/hosts
(that's the "files"), then mdns (gotta remove that, no mdns here),
then DNS.