Whenever you perform a search on Google, you often see ads at the top and/or the right side of the search results. That advertising is done through the Google AdWords service, and anyone can create an account. When setting up the account, you must decide which keywords (search terms) you want to bid on, your maximum bid for CPC (cost per click, which is how much you pay Google each time your ad is clicked), and the geographical locations where you want your ad to appear.
Google uses a number of different factors to determine if your ad is shown and in which position to show it. You can influence this in some ways, but it is not as simple as the highest bidder receiving the highest position. If you have the highest bid for a given keyword, but no one is clicking on your ad, then Google is not making any money by putting your ad in the top position. Instead, Google may give more weight to other factors, such as the historical clickthrough performance of your ads, the historical clickthrough performance of your campaigns, and the relevance of your landing page (the page on your website that the visitor reaches after clicking your ad).