| MadSci Network: Biochemistry | 
We'll take up both the gases one by one.
First Carbon dioxide (CO2). Well, as you know, CO2 is a by product of the metabolism of our body. In the lungs, CO2 is exchanged for O2. Both O2 and CO2 are carried by haemoglobin present in the blood. There is a fine balance of both the gases in our lungs during respiration. Now if the concentration of CO2 in the lungs increases, then, by what is known as the Bohr effect, it displaces O2 from the haemoglobin. So, less of oxygen is available to the body. This state of oxygen deprivation is called ASPHYXIA.
Helium acts in a very similar way, though its site of action is in the lungs, not haemoglobin as in case of CO2. I've copy-pasted an excerpt from an article on the website, which explains how helium causes asphyxia below (in blue). The concerned website is also mentioned below the excerpt.
"A little-known aspect of inhaling helium is how quickly you may lose 
consciousness due to asphyxia (oxygen deprivation). During the exchange 
of gases in the normal breathing process, the blood stream absorbs oxygen 
from air in the lungs, while carbon dioxide passes from the blood to the 
air. When you hold your breath, the exchange of gases slows, as "stale" 
air in the lungs is no longer replaced by "fresh" air. 
 
"This process does not stop instantly, however. Some time will pass before 
you start to experience serious physical distress (which is due to build-
up of CO2 in the lungs). For example, you would likely have time to pick 
up and put down an object, walk across a room, or find a chair and sit 
down before feeling compelled to breathe again (and take in fresh 
air/oxygen). 
 
"However, when the lungs are filled with helium, a different process takes 
over. Oxygen is actually removed from the lungs during the exchange of 
gases. Depending on how completely oxygen is replaced by helium, you may 
lose consciousness quickly and without warning—you may literally pass out 
while still standing. The usual result is an uncontrolled fall that can 
cause serious injury, even if normal breathing resumes before brain 
damage occurs due to lack of oxygen."
Extract taken from www.cganet.com/N2O/ helium_safety.asp with certain modifications.
Try the links in the MadSci Library for more information on Biochemistry.