It’s on a raspberry pi that is connected to your LAN. It is dns for the LAN and blocks any requests to hosts that are blacklisted
I visit some sites that sell their ad spaces directly to advertisers and create and host all creative themselves. I have no issue with those ads.
Windows will still connect to quite a few even if they are in the hosts file.
Both of them, however, allow you to manually specify the IP of a DNS server in advanced network settings.
For ex: Pihole + Unbound