Helicobacter pylori is a spiral shaped bacterium that lives in the stomach and duodenum (section of intestine just below stomach). It has a unique way of adapting in the harsh environment of the stomach.
The inside of the stomach is bathed in about half a gallon of gastric juice every day. Gastric juice is composed of digestive enzymes and concentrated hydrochloric acid, which can readily tear apart the toughest food or microorganism. Bacteria, viruses, and yesterdays steak dinner are all consumed in this deadly bath of chemicals. It used to be thought that the stomach contained no bacteria and was actually sterile, but Helicobacter pylori changed that.
The stomach is protected from its own gastric juice by a thick layer of mucus that covers the stomach lining. Helicobacter pylori takes advantage of this protection by living in the mucus lining.