Coughing is a reflex which helps clear your airways of irritants When nerves in the airways get affected by allergens  irritants  common cold  flu or other medical conditions  it results in a forceful discharge of air from the lungs thereby causing you to cough