Phlegm: A Key Player in Fighting Off Illness. Phlegm is a mucus-like substance produced by your lungs and respiratory system. When you get sick with a cold or a sinus infection, your body will produce more mucus than normal in an attempt to trap and expel the virus or bacteria causing your illness. Depending on your illness, the color and consistency of your phlegm will change. The American Chemical Society recently released a video that describes what different colors of phlegm may indicate and offers tips about which treatments are best for your symptoms.