Coin burning is the process of removing coins from circulation permanently, reducing the total supply. To explain how this is achieved and what the purpose is, we will be using Binance Coin (BNB) as an example.
The coin burn happens in this order. First, a coin holder will call the burn function, stating that they want to burn a nominated amount of coins. The token contract will then verify that the person has the coins in their wallet and that they have not stated an invalid number of coins, like 0 or -5, only positive numbers work. If the person does not have enough coins, or if the stated number is invalid, the burn will not execute. If they do have enough, then the coins will be subtracted from that wallet. The total supply of the coin will then be updated, and the coins will be burned. If you execute the burn function to burn your coins, the coins will be destroyed and become unrecoverable.
Each quarter Binance buys back and burns BNB equal to 20% of their profits for that quarter and will continue to do so until 100M BNB coins out of the 200M originally created have been burned. The Binance Coin contract has a function called the burn function. Anyone, at any time, can call this function to remove a nominated amount of coins in their wallet from circulation permanently. All coin burns are recorded in a transaction on the blockchain so that the coin burn is transparent and anyone can verify that the coins have been destroyed.
So why is this done? There are multiple reasons someone may want to burn coins.
One reason is in the case of ICOs. Some ICOs will offer a set amount of coins for sale with a fundraising hard cap. If all of the coins do not get sold, then the excess unsold coins may be burned and removed from the supply.
Destroying a certain number of coins has the same effect as spreading the total value of those destroyed coins to all the other holders of that coin. By reducing the supply of a coin, the coins that remain in circulation become more scarce, and therefore, more valuable.