if you block IP Adresses, you will block other Webpages hosted on the same IP too.
Here is a Tutorial to edit your hostfile:
http://techfleece.com/2011/08/15/how-to-edit-your-hosts-file-in-windows-7/
Please remember running notepad as administrator.
For blocking a website write an Entry like this:
127.0.0.1 blocked.tld
Alternative
You can try to configure your Router using the Open DNS Servers and use it with an account. So you can block all porn related requests. But the Setup is a little bit tricky. You have to enter the opendns DNS Servers and you have to link your external IP Address to your Account. They offer a tool for this.
If you use the hosts File Setup, make sure that the user your roommate uses don't have Administrator Permissions. Then he can't change it. Unfortunately you have to enter every porn site by your own.
If you have the skills to, i would prefer the opendns Setup.
More informations can be found here:
http://www.opendns.com/