Nexium is a medication used to treat acid reflux, ulcers, and excess stomach acid production. It works by reducing the amount of acid produced by the stomach. Common symptoms it treats include heartburn, difficulty swallowing, coughing, and upper abdominal pain. Nexium is prescribed to treat conditions such as gastroesophageal reflux disease and Zollinger-Ellison syndrome. It is important to take Nexium exactly as prescribed and not as an immediate relief medication for occasional heartburn.