H. pylori infection occurs when H. pylori bacteria infect your stomach. H. pylori bacteria are usually passed from person to person through direct contact with saliva, vomit or stool. H. pylori may also be spread through contaminated food or wate