H2 antihistamines and proton pump inhibitors both work to reduce gastric acid secretions but differ in their duration of action, spectrum of action, and mechanisms. H2 antihistamines work by antagonizing histamine at H2 receptors and have a shorter duration of a few hours. Proton pump inhibitors irreversibly inhibit the H+/K+ ATPase pump and have a delayed but longer lasting effect of up to 24 hours. Proton pump inhibitors also have a broader spectrum of action and can treat conditions like Zollinger-Ellison syndrome that depend more on gastrin than histamine.