Public blockchains are built on top of a set of software that is maintained and controlled by the network participants.
When changes are made to this software, the blockchain splits into two separate branches (forks). The two forks share history up to the point of the split, but then move forward in their own direction.
A fork can happen for many reasons: to add functionality, to fix a security vulnerability, or resolve a conflict in the community about the direction of the blockchain.
Hard fork: As long as network participants want to continue supporting and using the older fork, it can continue to exist. Example: The Ethereum Merge is expected to be a hard fork as some miners want to continue supporting the older version of the Proof-of-Work Ethereum blockchain.
Soft fork: If all network participants support and use the newer fork, the older fork ceases to exist. Example: SegWit was a change to the Bitcoin protocol that was supposed by most network participants so it functioned as a software upgrade where the single blockchain continued to exist.
Most software users are familiar with upgrades as the companies decide which direction to take the software. But given the governance of blockchain software, where network participants have a say in the direction of the software, the complexity of forks comes into play. Forks are a feature, not a flaw, of a future where open, shared, and secure software is available to and influenced by everyone.
