all interested national Olympic committees (NOCs) will first submit their application of bid to host the Olympics to the IOC.
then the IOC will announced the applicant cities and will required these cities to submit their formal bid
after that, IOC executive board will trim down to 5 candidate cities and will begin a lengthy and intensive bidding process including visits by the IOC excutive board members to candidates cities to check their facilities and plans. then the candidate cities will formally submit their final bid books.
the IOC will then call a session to begin the voting procedure among the IOC member nations. and there will be rounds of voting where the candidate city with the lowest vote per round will be eliminated until there will be two candidate cities left in the final round (usually last up to the 4th round). the city will the most number of votes will be declared winner and with it, the right to host the Olympic Games. sometimes, if a candidate city obtains more than 50% of total votes in the earlier round, that city will automatically declared the winner as what happened to Beijing when it won the hosting rights of the Olympics only in the second round.
as for the 2016 Olympics, here is the schedule towards the announcement of the host city:
September 13, 2007 - deadline for submission of the applications
October 1, 2007 - List of applicant cities announced
January 14, 2008 - Applicant cities submit their application files (Mini bid book)
(so far, 7 cities had already submitted their application namely, Chicago, USA; Rio de Janeiro, Brazil; Doha, Qatar; Madrid, Spain; Prague, Czech Republic; Baku, Azerbaijian; and Tokyo, Japan.)
June 2008 - IOC Executive Board selects Candidate cities among the Applicant cities
February 12, 2009 - Candidate cities submit their bid books
October 2, 2009 - Election of the host city of the Games of the XXXIst Olympiad (it will be held in Copenhagen, Denmark)
China won the hosting rights of the 2008 Olympics almost seven years ago (July 13, 2001) thru voting among the IOC members. at that time, they already know the situation in Tibet, the pollution of Beijing and its human rights record.
as to why they awarded the Games to China? its because at that time former IOC head Juan Antonio Samaranch wanted to give China a chance to show the world what they can do if they will host the Olympics after they lost their initial bid in 2000
hope this will help.