When you have a bad cough or bronchitis, the lining of your bronchial tubes, which carry air to and from your lungs, becomes inflamed. People with bronchitis often cough up thick, sometimes coloured mucus when they cough. Bronchitis can be short-term or last for a long time.
Check out Dr. Viny Kantroo's list of 7 reasons for your bad cough.