Dear Student ,
Pneumonia is an infectious disease caused by the agent Streptococcus pneumoniae .
The air we breathe is most of the times gets filtered by our nose and airways which prevents the infection of lungs. However, sometimes germs find a way and reach the Lungs to cause disease. In the case of Pneumonia , the agents causing the disease reaches Lungs leading to inflamed alveoli ( air sacs of lungs). This lead to filling up of fluid in the lungs.
Regards!