For a detailed description of what the resolv.conf file does, see the resolv.conf(4) man page.
See Setting Up the resolv.conf File for a discussion on how to set up the resolv.conf file.