First, a quote from http://www.accs-net.com/hosts/what_is_hosts.html:
The "Hosts" file in Windows and other operating systems is used to associate host names with IP addresses. Host names are the www.yahoo.com addresses that you see every day. IP addresses are numbers that mean the same thing as the www words - the computers use the numbers to actually find the sites, but we have words like www.yahoo.com so humans do not need to remember the long strings of numbers when they want to visit a site.
For instance, the host name for Yahoo! is www.yahoo.com, while its IP address is 204.71.200.67 Either address will take you to Yahoo!'s site, but the www address will first have to be translated into the IP address. If you type in the IP address directly, your computer will not have to look it up.
A series of steps are used when searching for IP addresses that go with these host names. The first step, and the one that concerns us here, is the hosts file on your local computer. The Hosts file tells your computer what the name is in numbers so the computer can go find it. If the IP address is found in your Hosts file, the computer will stop looking and go to that site, but if it is not it will ask a DNS computer (domain name server) for the information. Since the search ends once a match is found, that provides us with a mechanism to block sites we have no interest in. You may block sites that serve advertisements, sites that serve objectionable content, or any other site that you choose to block.
End quote.
The HOSTS file path:
%SystemRoot%\\SYSTEM32\\DRIVERS\\ETC\\HOSTS
I have created a Shortcut to my HOSTS file with NOTEPAD.EXE for quick and easy access. Any IP address that is exposed to the public Internet can be entered into the HOSTS file and subsequently resolved. This is a big deal to a non-networking guy like me. In theory I can leave my computer on at home, jot down my IP address and later resolve it from a remote location (unfortunately/fortunately my firewall may have a few things to say about that).