The body triggers a cough when the airways become irritated with dust, allergens or a buildup of excess mucus, according to WebMD. The cough helps to force mucus up to the throat and mouth where it is either swallowed or spit out.
Mucus is a moist, protein, antibody and enzyme rich substance produced by the body and used throughout the body. Most healthy adults don't notice the thin layer of mucus produced in their sinus cavities, throat and airways day and night. It is only when something begins to irritate these parts of the body which triggers a change in mucosa production that people become aware of an excess amount of mucus, according to WebMD.
A variety of things can trigger the urge to cough up mucus, but it is usually the result of allergens, like pollen, and dust irritating certain cells that line the airways. These cells tell the body to start coughing, which forces air rapidly through the airways and out of the mouth. The speed of this movement vibrates the mucus lining the walls of the airway, carrying it up into the throat or even out of the mouth. From here, those who are ill have the urge to spit out unwanted mucus. The process sounds unpleasant, but without mucus allergens and debris can get down into the lungs and clog things up.