Ad Rank is the underlying concept which decides which Ad will show on which position.
Ad Rank = Your CPC bid * (Quality Score[80% weight] + Ad Extensions [20% weight])
CPC is cost per click you are willing to pay
Quality score is measure automatically based on your Keyword CTR, Ad relevance & Landing Page Quality
Ad extensions are now required to be used in all Ads