Anti-doping rules adopted for the Olympic Games are increasingly severe.
Significant increase in number of tests
The increase in the number of tests: up from 3,600 in Athens to 4,500 in Beijing, serves as a clear demonstration of the IOC's commitment to ensuring that athletes play fair. As a general rule, all top five finishers plus a further two were tested. The tests included pre-competition controls, which had proved to be decisive. Of the 4,500 tests, around 700 to 800 applied to urine EPO detection and 900 were blood tests.
Who does what?
As the ruling body for the Olympic Games, the IOC delegated the responsibility for implementing doping controls to the Organising Committee for the Olympic Games and the World Anti-Doping Agency (WADA). They acted under the IOC’s authority. The IOC Medical Commission was responsible for overseeing all doping control processes on-site, which was in full compliance with the IOC Anti-Doping Rules, the World Anti-Doping Code and the International Standard for Testing (ISO9001:2000).

World Anti-Doping Code
Please find below a link to the WADA world anti-doping code:
The World Anti-Doping Code - 2009