Aspiration pneumonia occurs when food, liquid, saliva, or vomit is inhaled into the lungs instead of being swallowed into the esophagus. This can lead to an infection or inflammation in the lungs. While anyone can develop aspiration pneumonia, certain groups, including cancer patients, are at a higher risk.