It is used to treat heartburn, stomach ulcers, reflux disease, or other conditions that cause too much stomach acid. It works by reducing the amount of acid in the stomach.