Pepcid is a histamine-2 blocker, Protonix is a proton pump inhibitor.
HCl in the stomach is secreted by parietal cells. There are 3 types of receptors on parietal cells: histamine -2, achetylcholine and gastrin.
The histamine-2 receptor operate off the principle of a Hydrogen/Potassium pump. One the histamine is produced by the mast cells of the stomach, it binds, and through a series of events (cAMP, protein kinases) causing increased action of the H+/K+ cotransporter pump in the parietal cell wall.
Think back to your chemistry: What is acid? As your pH becomes lower/more acidic, what happens to the concentration of hydrogen ions?? It INCREASES!
The H+/K+ brings hydrogen luminal (inside the GI) and the potassium inside the cell, which also serves to restore cellular homeostasis and maintain intracellular resting membrane potential.
So when we block this process, we're preventing H+ from entering the gastric lumen, thereby decreasing the acidity/pH.
(Note, do NOT confused H-2 blockers, like Pepcid, with H-1 blockers, like Benadryl. Apples and oranges)
Protonix works on the achetylcholine and gastrin receptor mechanisms.
Ach and gastrin bind to the sites on the parietal cell, causing increased calcium influx, and stimulating the whole cAMP/protein kinase cascade. Both of these, however, act on H+/K+ ATP-ase pumps in the cell wall. Once again, H+ is prevented from entering the gastric lumen.
Important distinction: H+/K+ for H-2 receptors operates off a co-transporter, and requires potassium move against its concentration gradient. It's a slower process, because it's having to move uphill. Not as efficient of a process.
H+/K+ ATP-ase is an active transport mechanism, meaning it utilizes ATP as energy to transport the potassium against its concentration gradient. Much more efficient of a process.
There's more to this, but this is the big picture.
There are also other considerations, having to do with other substances produced by the various stomach cells - whoever's prescribing may not want to take the chance of blocking down any of the other functions of the cells by inhibiting any release of the various substances required to produce the parietal cell reactions.
Both can be given IV and PO, so routes of adminsitration aren't that big of a deal.
Pepcid is much cheaper, as well.
Hope this helps.