A hard fork and a soft fork are both changes to the rules of a blockchain network, but they have different effects on its compatibility. Here are some key differences:
A hard fork is a non-backwards compatible change that creates new rules to the blockchain protocol. For example with Bitcoin Cash, the changes were upgrades to the block size, and because the new rules were incompatible with the old rules, it was a hard fork that nodes which didn't upgrade stayed on the old blockchain version and nodes that did upgrade were on the new blockchain version. Nodes that do not upgrade to the new version will not be able to validate new blocks and transactions on the new chain. A hard fork can result in a chain split, where both the old and new blockchains coexist independently, such as with Bitcoin Cash (BCH) and Bitcoin (BTC).
A soft fork is a backward-compatible change that tightens the rules of the blockchain protocol by adding new changes and not removing old rules. Nodes that do not upgrade to the new version will still be able to validate new blocks and transactions on the old chain. A soft fork does not create a new blockchain, but it can cause a temporary chain split if nodes do not follow the new protocol rules. An example of a soft fork is SegWit in Bitcoin (BTC), which removed signature data from the blocks to increase the transaction throughput.
In a well-written
blog post by Ethereum founder Vitalik Buterin, he says that soft forks are coercive, and hard forks are not. Hard forks are opt-in, while users of a soft fork are forced into the protocol changes whether they like it or not. He writes, "In order for a user to join a hard forked chain, they must personally install the software package that implements the fork rules, and the set of users that disagrees with a rule change even more strongly than they value network effects can theoretically simply stay on the old chain. In the case of soft forks, however, if the fork succeeds the unforked chain does not exist. Hence, soft forks clearly institutionally favor coercion over secession, whereas hard forks have the opposite bias."