Nexium (esomeprazole) belongs to a class of drugs called proton pump inhibitors. Nexium decreases the amount of acid produced in the stomach. It is prescribed to treat the symptoms of GERD, and other conditions that cause excessive stomach acid. It can also be used to prevent gastric ulcer caused by infection with helicobacter pylori (H. pylori), or by the use of nonsteroidal anti-inflammatory drugs. Nexium is not used for immediate heartburn relief.