Whether you’ve given a computer to your child or just want to keep things clean on your own machine, blocking sites that serve malware, porn, social networking, and gambling en masse is useful. And while there’s lots of third party software out there for the job, the hosts file is a built-in option for every major operating system.
Source: How-To Geek