The cough begins with an initial gasp that draws air deep into the lungs. Next, the glottis snaps shut, putting a lid over the trachea, or windpipe. The third step is the forceful contraction of the muscles of the chest cage, abdomen, and diaphragm (see figure). In normal breathing, these muscles push air gently from the lungs up through the nose and mouth. But when the glottis is closed, the air can't move out, so tremendous pressure builds up in the air passages. Finally, the glottis swings open and the air rushes out. And it is quite a rush; in a vigorous cough, the air travels out at nearly the speed of sound, creating the barking or whooping noise that we call a cough.
A cough can be a conscious, voluntary act or an uncontrollable, involuntary reflex. In the latter case, stimulation of nerves in the larynx ("voice box") and respiratory tract initiates the entire process. These nerves can be irritated by infections, allergies, cold air, tumors, chemical agents such as smoke, mechanical factors such as dust particles, or by normal body fluids such as nasal mucus or stomach acid. It's no wonder, then, that so many different things can trigger a cough.