There are various commercial packages that will do this for you. Search for parental controls. None of them are perfect but they are better than nothing. However, by the time your children are in their teens they will probably have figured how to get round any filter you put in place.
K9 parental controls is the best one, and it's free. It's very easy to set up, just download and run it.
As well as blocking stuff it's really important to just talk to them about what they might find, how they can deal with it and that they can talk to you/other trusted adult if they're worried about anything.
I can give more specific info on talk topics tomorrow but I need to sleep now.
K9 doesn't work with Windows 8 though, does anyone know of an alternative?
I've been using Microsoft Family Safety but it's failed big time, I've been receiving no reports and it's not been filtering anything or enforcing the curfew or time limits even everything is turned on. I haven't been able to get any useful help from the Microsoft Support people, they tell me to either find Family Safety in "uninstall/modify a program" in Control Panel but it's not listed here, or to click on a "get the latest settings from the web" icon which doesn't exist.