In most cases, coughing is an automatic reflex that helps clear the airways of mucus or irritants. Most coughs clear up within 3 weeks and do not require medical attention.