Phlegm is a thick and sticky mucus-like substance produced by the respiratory system. It is primarily composed of mucus secreted by the mucous membranes lining the airways. Phlegm serves as a defense mechanism to trap and remove foreign particles, such as dust, bacteria, and viruses, from the respiratory tract. It can be coughed up or expelled through sneezing, aiding in the removal of irritants and helping to keep the airways clear. Changes in the color, consistency, or amount of phlegm can provide indications of certain respiratory conditions or infections.