An ad exchange is a digital marketplace where Advertisers and publishers can buy and sell ad inventory directly on an ad exchange. An middleman is not used in ad exchanges.
Ad networks are the best option if you want to buy ads in bulk, but ad exchanges are better if you want to keep your ad campaigns dynamic.