A fork is a technical event that occurs when a blockchain’s existing code is modified or updated, resulting in a divergent network that can follow different protocols or rules.
There are two types of forks in the cryptocurrency sphere: hard forks and soft forks.
A hard fork occurs when there is a significant change in the protocol or rules of a blockchain that is not backward compatible. This means that nodes that don’t upgrade to the new rules will be unable to validate transactions on the new chain, resulting in a separate network with a different cryptocurrency. Hard forks can occur due to disagreements among the community, technical limitations, or new features or improvements that require a significant change to the existing code. For example, Bitcoin Cash (BCH), forked from Bitcoin in August 2017; Bitcoin Cash increased the block size limit from 1 MB to 8 MB to improve scalability and transaction speed.
A soft fork, on the other hand, occurs when there is a minor change to the protocol that is backward compatible, meaning that nodes that don’t upgrade to the new rules can still validate transactions on the existing chain. Soft forks can occur to fix bugs, improve network performance, or add new features that are compatible with the existing code. Segregated Witness (SegWit), for example, is asoft fork that was activated on the Bitcoin network in August 2017, SegWit redefined the way transaction data is stored in blocks, increasing the block size limit to allow for more transactions per block.
Both hard and soft forks can result in the creation of a new cryptocurrency, as the forked chain will have a different mechanism and set of rules than the original chain.