There are two primary approaches to this problem:
The centralized approach and the distributed approach. Which one you choose depends on your environment. If you have a large enterprise, you might want to look at a proxy server like the Blue Coat Systems with Websense content filtering, which has some functionality to control the problem. If you have a smaller network and you have more control over the user PC’s, you might want to consider something like: Pest Patrol, Spy Catcher, etc. You can find some articles in the following links:
Also, don’t underestimate the power of policy and user awareness education. Usually, this type of software is loaded from a user’s activity on the web. If you can convince your users to behave themselves, you’ll see fewer problems.