Adnetworks act as middle men between the advertizers and publishers. They collect money for the ads from advertizers, make suitable ads and display them on the website of their publishers. In return, for the space offered, they pay certain commision to the publisher.