Pi-hole being a advertising-aware DNS/Web server, makes use of the following technologies:
dnsmasq- a lightweight DNS and DHCP server
curl- A command-line tool for transferring data with URL syntax
lighttpd- web server designed and optimized for high performance
php- a popular general-purpose web scripting language
- AdminLTE Dashboard - premium admin control panel based on Bootstrap 3.x
sqlite3- SQL Database engine
While quite outdated at this point, this original blog post about Pi-hole goes into great detail about how Pi-hole was originally set up and how it works. Syntactically, it's no longer accurate, but the same basic principles and logic still apply to Pi-hole's current state.