They don't. The blockchain is by definition a chain of mined blocks. If nobody mines the next block, then the blockchain cannot grow, and no further transactions can be included in it. Transactions will cease to be confirmed until somebody does mine another block.
Transactions can still be relayed over the peer-to-peer network, and nodes will verify their signatures and store them in their mempools, but there will be no real protection against double spending. Someone might create two or more transactions which conflict; some nodes may store one and others may store the other. No consensus will necessarily arise as to which one should be accepted as the "right" one.
If this state of affairs becomes permanent then the currency is effectively dead.
Another not-so-apparent to mine is to spend coinbase coins which have a maturity period of 100 blocks. If miners stop to mine, they not only lose opportunity cost of not mining next block, but also lose previous 100 blocks of reward. – sanket1729 – 2017-10-30T06:01:11.033
@sanket1729 okay, so basically a miner of a block has to have 100 confirmations before they get rewarded – siddharth – 2017-10-30T13:05:26.883