Lansoprazole is a proton pump inhibitor used to treat gastric and duodenal ulcers, erosive esophagitis, and excess stomach acid in acid reflux. Proton pump inhibitors work by blocking the production of stomach acid made by glands in the lining of your stomach, resulting in a reduction in symptoms associated with acid reflux.