Pneumonia is usually the result of a bacterial or viral infection and you can catch pneumonia from someone who already has it, as you can with the common cold.