Pneumonia is swelling (inflammation) of the tissue in one or both lungs. It's usually caused by a bacterial infection.
At the end of the breathing tubes in your lungs are clusters of tiny air sacs. If you have pneumonia, these tiny sacs become inflamed and fill up with fluid.