How do media agencies determine the best media mix for a particular advertising campaign?

Media agencies consider a variety of factors such as the target audience, campaign goals, budget, and previous campaign performance to determine the best media mix for a particular advertising campaign.