Pnuemonia, lobular infiltrates, and plueral effusion are instances when fluid has been trapped in the lobes of your lungs. Generally speaking, it is noncontagious.
Certain Bacterial pneumonias will sweep through hospitals, schools, nursing homes.... Very contagious, serious medical concern. My grandfather contracted pneumonia while in the hospital. He had been admitted for a broken hip. The doctors informed us that they had a break out of pneumonia on that particular ward. They were trying to control the spread.