Halving helps cryptos like bitcoin to enter the system at a steady and controlled rate, slowing them down over time, and gradually reducing their rewards.
Halving is a cryptocurrency term. It's the term for the process of cutting the frequency rate at which new coins are issued. It achieves this by halving the subsidy that miners are paid for each block that they produce. This happens every once in a while, and concludes at a set point, after which no more coins will be released.
New bitcoins are created about every 600 seconds as part of the block reward (comprising the block subsidy and transaction fees). This means that when a miner is successful in validating a new block, some of the newly minted currency is paid to them to compensate them for their efforts.
This approach to mining ensures that coins enter the system at a fairly steady rate that doesn't deviate much. The block subsidy also steadily declines over time, dropping 50% every 210,000 blocks which equates to around four years.
Very first block subsidy amounted to 50 BTC, then it dropped to 25 BTC in 2012, 12.5 BTC in 2016, and 6.25 BTC in 2020. After 32 of these halving dates have passed, all the bitcoins that are ever going to be created-21 million BTC-will exist.
Bitcoin runs on open-source code so the curious can examine the part that relates to halving in the Core Implementation on GitHub:
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;
// Force block reward to zero when right shift is undefined.
if (halvings >= 64)
CAmount nSubsidy = 50 * COIN;
// Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
nSubsidy >>= halvings;