/etc/hosts contains a list of IP addresses and the hostnames that they correspond to. In general, /etc/hosts only contains entries for your local machine, and perhaps other ``important'' machines (such as your nameserver or gateway). Your local name server will provide address-to-name mappings for other machines on the network, transparently.
For example, if your machine is loomer.vpizza.com with the IP address 188.8.131.52, your /etc/hosts would look like:
184.108.40.206 loomer.vpizza.com loomer
If you're only using loopback, the only line in /etc/hosts should be for 127.0.0.1, with both localhost and your hostname after it.