PPIs, or proton pump inhibitors like Nexium 24HR, treat frequent heartburn by blocking the production of acid at the source. Protection from frequent heartburn lasts for 24 hours. PPIs may take 1-4 days for full effect, but remains effective over consecutive doses.
H2s, or histamine blockers, treat heartburn by blocking one of the signals that tell your body to make acid. They start working within 30 minutes and their effects can last up to 12 hours. If taken more than a few days in a row, they can become less effective.
Antacids treat heartburn by neutralizing the acid in your stomach but do not reduce acid production at its source. Antacids work quickly, but effects last for only 1-3 hours after use.