Phlegm is a mucus-like substance produced by your lungs and respiratory system. When you get sick with a cold or sinus infection, your body will produce more mucus than normal in an attempt to trap and expel the virus or bacteria causing your illness.