Notepad will open. At the *very bottom, on a new line* of the file that is shown type the website you want to block on the right, and 127.0.0.1 on the left. So if you want to block google, type this:
127.0.0.1 google.com
This will prevent every program on the computer from accessing the site. Don't include http: or www. before the domain you want to block, and make sure you *save* the notepad file when you're done. Then, for this to start working, go to start>run and type:
ipconfig /flushdns
It will now block the sites.
Note that changing the HOSTS file could make your internet stop working, if you make an entry like:
127.0.0.1 com
since everything with a .com won't work anymore. Also, if you remove the:
127.0.0.1 localhost
entry that is there when you open it, some applications might not work.
If the person you're trying to block uses a limited user account, they won't be able to access the HOSTS file. Even if they have an administrator account, most people don't know anything about the HOSTS file.
Attention: NOTHING on this site may be reproduced in any fashion whatsoever without explicit consent (in writing) of the owner of said material, unless otherwise stated on the page where the content originated. Search engines are free to index and cache our content. Users who post their account names or personal information in their questions have no expectation of privacy beyond that point for anything they disclose. Questions are otherwise considered anonymous to the general public.