Stimulated by carbon dioxide accumulating in the bloodstream. When levels build up, this triggers the breathing centres in the brain, which in turn stimulates the muscles used to inhale. As activity increases, more CO2 is released into the blood, causing the levels to rise faster and therefore increasing the rate of breathing. This is why it is very hard to hold your breath until you pass out as little kids often threaten to do. Of course, anyone stupid enough to counteract their own bodily defenses may deserve to pass out occasionally.