H2s treat heartburn by blocking one of the signals that tell your body to produce acid. However, if you use H2 blockers over and over again, they can become less effective at treating heartburn.
PPIs (proton pump inhibitors), like Nexium 24HR, treat frequent heartburn by blocking the production of acid.