it works similar to dns, it can be used to block a web address if you point it to a non standard loopback address sometimes, like 127.0.0.7
it many of the newer os's you need to copy the host file to the desktop with file extensions enabled, delete the version in c:\windows\system32\drivers\hots\etc and then copy it back, it will try to give it a .txt file extension and you need to make sure it does not, if it does remove it.