Pneumonia is an inflammation of the lung. This means the lung is swollen and may be painful. Inflammation is the immune system's normal response to injury or contaminants. Germs, bacteria, and viruses are contaminants and can cause inflammation.