Essentially, a blockchain fork is a collective agreement upon software update. Since there is no central authority to upgrade the decentralized protocol, the entire Bitcoin community needs to collectively approve it. If there are any disagreements, a fork will occur. Depending on the compatibility with the existing blockchain, a fork can be classified as a “hard fork” or “soft fork”.
Hard forks change consensus rules (i.e. block size, mining algo, consensus protocol) in a way that makes older versions of the software incompatible. After the blockchain protocol changes, old nodes will reject blocks created by new nodes after the Bitcoin protocol changes. Miners will follow the original rule, creating a new block on the latest verified block.
For soft forks, they are software updates that are still compatible with previous versions. Old nodes won’t detect the change in the blockchain protocol and continue to accept the blocks created by new nodes. Miners may work on blocks that they didn’t fully understand or validate.
Both hard forks and soft forks are backward compatible, which means that new software accept the code produced by older software. Overall, each fork is unique and results in a different outcome. It’s important to know the context and details around each fork in order to take advantage of the sudden and dramatic changes that often ensue.