It inhibits the activity of a specific enzyme system found inside the stomach cells (in the stomach) that secrete acid, thus preventing the production of acid. Omeprazole is used to treat: heartburn (heartburn), acute gastritis, duodenitis (duodenitis), esophagitis due to regurgitation of stomach contents, peptic ulcers.