The basic idea:
Suppose Alice and Bob disagree on whether the world will end a year from tomorrow, with Alice believing it will end. If she is right, then there will be no way to settle the bet, what with the apocalypse and all that. Thus there is no way for her to collect, and so she has no incentive to bet on the apocalypse, no matter how certain she is.
Or so it would seem! The way around the difficulty is simply for Alice to get her money today, and enjoy it for a year. If she turns out to have been right, then she will have been paid properly. If the world doesn't end, then of course she'll have to return the money, plus interest--plus a penalty for being wrong.
The actual terms should depend on the confidence Alice and Bob place in their respective positions.
Personal note: Several people at my place of work have told me that they are worried about the world ending later this year. They saw a movie about it, or something. So far, they have rejected my bet proposals.