If you aren't already familiar with the way DNS works, it will help to understand a couple of basic concepts before we begin...

DNS (Domain Name System) is the networking service that is resposible for resolving the domain name that a given IP address is mapped to on the internet. For example, entering http://google.com into your web browser does the same thing as accessing directly via it's IP address http://172.217.3.110. Obviously it's easier to remember the url, this is precisely why DNS is the backbone of the internet; serving as a type of roadmap to help you navigate the contantly changing freeway that is the internet we know today.

Now, on to the hosts file... On every modern operating system, exists a local file called hosts; this is just a plain text file that the OS checks for a matching entry each time a DNS request is made by the device. If no entry for that particular host exists, it then sends the request to whatever DNS server your network connection tells it to (most of the time your internet router which is configured to forward dns request to a public server hosted by your isp for it's customers to use).

Let the fun begin!

The AutoUpdate project is maintained by ScriptTiger:
https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate
The Unified Hosts project is maintained by Steven Black: https://github.com/StevenBlack/hosts