There is an excellent thread at WebmasterWorld, where the Google AdSenseAdvisor posts how geo-targeting works with Google's contextual ad program, Google AdSense.
Geotargeting is based on the IP address of your users. So, say one page of your site is about Spain, and a user from Japan is viewing it. That user will see AdWords ads targeted to 1) a Japanese audience and 2) the text based content of the site. The advertiser chooses which countries they would like to target. A user in Canada might see a different set of ads.So, your Japanese readers MAY see ads specifically targeted to 'Spain'. However, they may also see ads for 'Portugal' if these are the highest paying ads available for a Japanese audience that are also relevant to the page content (i.e., travel in Iberia).
Regardless, the highest paying ads available at any given moment for any geographic audience will always appear on your site. And 'highest paying' isn't solely determined based on bid price, but on quality score as well -- meaning how the ads actually perform (see http://adsense.blogspot.com/2006/02/ad-rank-explained.html for more information about ad ranking).
AdSenseAdvisor continues to explain that;
When viewing a travel page from Spain, the Japanese and Canadian visitors will see ads for hotels in Spain as long as the Spanish advertisers configured their ad to show to users not just from Spain, but from other countries such as Japan and Canada. The advertisers control the targeting in this case.
I didn't want to misquote, so I pulled the quote direct. The wording of the posts are very clear.
Forum discussion at WebmasterWorld.