

It can also be abused by malware to redirect domain, for things like phishing your Internet banking to other IP address to steal your bank account password. Whether there is not relevant host map to URL, it resolves the IP address via DNS servers. If you enter any URL in the web browser, the system first checks the hosts file.

Often it is being modified to block malicious sites or sites with inappropriate content, for web development, to redirect domain names to local addresses etc. Hosts file is IP network protocol configuration file used by operating system to map the hostnames to IP addresses.
