system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: what exactly is phlegm and why does it change colour based on our health?
gpt
It's mucus.  Snot, just like the stuff found in your nose.

People think of mucus as being found only in the nose, but there's a layer of it that coats your entire respiratory tract, from your nostrils all the way down into your lungs.  It cleans the air you breathe by acting like flypaper: dust, smoke, germs, etc. get stuck in the mucus before they reach the lungs.  Wavy hairlike structures called cilia push it into your throat, where it drops down to your stomach to be destroyed.

You only really notice phlegm when you're sick, because the flypaper starts getting saturated with germs and with dead immune cells.  This changes both the color and the consistency of the phlegm.  Also, your body starts secreting a whole lot more of it to help fight off the infection.