Coughing is how the body removes mucus, dust, and other foreign particles from the lungs and airways or from irritation of the airway. Coughing is a symptom, not a disease and its characteristics and related symptoms help determine its cause.
Productive coughs produce phlegm which may drain from the sinuses or come from the lungs. Productive cough can be caused by viral illness, bronchitis, sinusitis, pneumonia, tuberculosis, chronic lung disease (COPD, etc.), gastroesophageal reflux disease, nasal discharge (postnasal drip), and smoking. It should not be suppressed so the mucus is cleared from the lungs.
Nonproductive cough is dry and has no sputum production. Dry hacking cough can develop at the end of a cold or after exposure to smoke or dust. Dry cough can be caused by viral illnesses, bronchospasm (irritants or irritation of the airway), allergies, certain medications (such as ACE inhibitors), or asthma.