Google Adwords works on the basis of Quality Score. Quality Score means how likely your ad is to get clicked. Whenever a search is performed in Google, an Adword Auction is created. The Ad rank of the competitors shows how well they are competing. Ad rank is found out by-
Ad Rank = Quality Score * Bid.
Then Ads are placed in the results page in accordance with their rank. The ad getting highest rank is placed at the top of search results and the one getting lowest is at the last.
This is how Google Adwords work.