These drugs comes under the category of “Proton Pump Inhibitors” whose action is pronounced reduction/inhibition in the production of stomach acids. Proton Pump Inhibitors are widely sold drugs around the world and among them Omeprazole and Ranitidin are included in the WHO Model List of Essential Medicines.
The mechanism of action is by inhibiting the production of acid secretion in the stomach by 99%. The gastric juice contains several proton ions. These drugs makes use of the proton ions present in the gastric juice and becomes protonated (activated) thereby deactivating it.