Pneumonia is a lung infection usually caused by viruses or bacteria. A person with pneumonia may have a fever and cough, and it may be hard to breathe for a little while. A doctor can tell if someone has pneumonia by listening to their lungs or looking at a chest X-ray. Pneumonia can be serious, so sometimes a person who has it needs care in a hospital. But doctors usually can treat it while a person gets better at home.