Here is its Wiki: http://en.wikipedia.org/wiki/Hosts_(file)
Beginning with Windows 7, name resolution for localhost is handled internally by DNS itself, so its definition isn’t required in the Hosts file and these entries are now commented out with the # character in the default hosts file.
The ARPANET, the predecessor of the Internet, had no distributed host name database. Each network node maintained its own map of the network nodes as needed and assigned those names that were memorable to the users of the system. There was no method for ensuring that all references to a given node in a network were using the same name, nor was there a way to read the hosts file of another computer to automatically obtain a copy.
The small size of the ARPANET kept the administrative overhead small to maintain an accurate hosts file. Network nodes typically had one address and could have many names. As local area TCP/IP computer networks gained popularity, however, the maintenance of hosts files became a larger burden on system administrators as networks and network nodes were being added to the system with increasing frequency.
Standardization efforts, such as the format specification of the file HOSTS.TXT in RFC 952, and distribution protocols, e.g., the hostname server described in RFC 953, helped with these problems, but the centralized and monolithic nature of hosts files eventually necessitated the creation of the distributed Domain Name System (DNS).
On some old systems a file named networks is present that has similar to hosts file functions containing names of networks.
This is what I have always used the HOSTS file for:
Internet resource blocking
Specially crafted entries in the hosts file may be used to block online advertising, or the domains of known malicious resources and servers that contain spyware, adware, and other malware. This may be achieved by adding entries for those sites to redirect requests to another address that does not exist or to a harmless destination, e.g., localhost. 
There are software applications that populate the hosts file with entries of undesirable Internet resources automatically.
Your browser first checks your hosts file to see if it has an IP address for nytimes.com. If the hosts file has an entry it is used, otherwise a domain name server is queried to get the IP address of 18.104.22.168. (Yes, technically, you can enter that IP address into your browser’s address bar and get to http://www.nytimes.com.)
One benefit of using the hosts file is precedence. Most systems access this file first because it’s loaded into the computer’s memory at start up. There are some exceptions such as people who use proxy servers.
When various types of Internet advertisements became invasive, some people used the hosts file as a means to bypass the ads. People would add an entry to their hosts file that redirected an ad server away from the intended destination. Or, using our analogy from above we could redirect the New York Times traffic to your home address.
This redirection can be accomplished by adding a line such as the following to the hosts file:
127.0.0.1 http://www.xyz.com # ad server for XYZ company
In the above example, when your web browser encounters a request for http://www.xyz.com, it would look in the hosts file and find the entry 127.0.0.1. This IP address is a universal address assigned to the localhost that is your PC. So, rather than going to the true IP address for the XYZ ad server, the request would stop at your PC and the ad wouldn’t appear. You can also add a # sign and comment to identify the site.