As was mentioned before, you need to be logged in as root.
Type on the command line:
/bin/su - and then enter your password.
Then what you need to do is use a text editor of some sort to actually change the file. I am positive that you can use vi as was suggested. I prefer to use emacs, but that is just me.
emacs /etc/hosts (if installed) or vi /etc/hosts
or kedit /ect/hosts (if installed)
Your choice! Just try one as a regular user first if you are nervous. You can't blow up your machine doing it.
I have never used vi in gui mode so Im not sure what it's like, but emacs is very, very easy to use and it even gives you a backup in this format filename~ (which I am sure is standard for all text editors) so that you can go back if you make a mistake.
Good luck. It is really very easy