Sometimes not mostly. In adults most bacterial pneumonia is caused by aspiration of small amounts of bacteria that have colonized ( live in) the mouth. If one is succeptible you get pneumonia, direct people to people spread from coughing etc is not typical. There are pneumonias caused by germs that are more directly spread, for example pneumonia related to viruses like the influenza or some bacteria like tuberculosis.
Yes. Pneumonia is generally considered contagious until the person is afebrile or has been receiving appropriate antibiotic therapy for 24 hours. Viral pneumonias are typically more contagious than bacterial pneumonias. Good hand washing is the most important step to decrease the risk of spreading or catching pneumonia.