Ad networks can seem intricate at first glance, but the basic idea isn't so difficult to get. Essentially, they're online marketplaces where companies can programmatically buy ad space from websites who have ad slots https://www.youtube.com/watch?v=502V9vWL_OQ