A web proxy server sits between the computers on your network and the internet. The proxy server intercepts HTTP and HTTPS traffic, acting as a border control officer. It checks the web address (or URL) someone is trying to access, and, if it’s on the banned list or matches any of the banned criteria, the proxy server refuses the connection.
If the proxy server is happy with the website, it retrieves the web page and forwards it to the computer that requested it. This provides a degree of anonymity for the devices on your network.
The proxy server frisks the web pages it retrieves. Any tracking scripts, adverts, or other unwanted material is stripped, so you only receive a clean web page. The hidden payload of snooping and privacy-invading cruft that often accompanies a visit to a website is removed.
Link: How to Use a Raspberry Pi as a Proxy Server (with Privoxy)