When you configure the TCP/IP network stack on the client device as part of the configuration you define the DNS servers that the client device will use. Since
you are referring to /etc/resolve.conf and /etc/hosts then your client device is some flavor of Unix/Linux OS. What /etc/hosts is a list of server names and ip addresses that the OS can use to find and communicate with servers even if the DNS server is unavailable. What /etc/resolve.conf has is the names of the DNS servers that your client is configured to request name lookup information, the domain your client is a part of and what additional domains should be appended to search when looking up names of servers.