Bitcoin is a protocol: a set of rules everyone on the network adheres to. As Bitcoin evolves, some changes need to be made to the protocol. Sometimes the opinions differ as to what the rules should be. It may happen that different groups see a different future for Bitcoin. When this leads to two different implementations it may lead to a fork.
A fork in software development means that the source code is copied and modified by someone else. Each time the code is copied separately there will be a new branch. This would be called ‘forking’, since the same code would then develop in two parallel directions. The cryptocurrency Litecoin, for example, is a fork of Bitcoin because the Litecoin developers copied Bitcoin's code, made some changes, and launched a separate project.
A Bitcoin Fork
A Bitcoin fork means the blockchain is splitting into two or more directions, leaving new blocks of one chain unacceptable by the other. We end up with two different chains resulting in a fork of the Bitcoin blockchain (which is different from a fork of the software).
When we talk about a fork of the Bitcoin software there is a distinction between two types of forks: A soft fork and a hard fork. Simply put, one can say that a soft fork makes the rules stricter by adding restrictions, while a hard fork softens the rules by removing restrictions. This sounds contradictory, but let me explain how it works.
Soft Fork
A soft fork is a fork where updated versions of the protocol are backwards compatible with previous versions. A soft fork of the Bitcoin protocol makes the set of rules stricter, which means after a soft fork there is less allowed.
An example of a soft fork is when the block size was set to 1MB in 2011. Before this soft fork there was no limit. By setting the limit to 1MB, the rules have become "stricter". Blocks larger than 1 MB were no longer accepted by the new nodes. If a node does not upgrade to the new version it has no problem with the new situation, because the new rules do not conflict with the old rules. A block of 1 MB will still be accepted according to the rules of the old nodes, so updating is not necessarily required. This is a soft fork.
Hard Fork
A hard fork is a change of the protocol that is not backwards compatible with older versions of the software.
When the block size is changed from 1MB to 2MB, it eases (softens) the rules. A 2MB block will not be accepted according to the old rules, but will be accepted according to the new rules. According to the new rules there is more allowed than according to the old rules.
All nodes that are not being upgraded won't be able to follow Bitcoin's new set of rules. The new 2 MB rule conflicts with the maximum size of 1 MB according to their rules, so they won't accept the bigger blocks. This creates a blockchain that uses the old rules, and one that uses the new rules. This is a hard fork.
If the whole community agrees with an upgrade of the protocol a hard fork is no problem. The Steem blockchain has been 'hard forked' 18 times before without any problems. All witnesses agreed with the upgrades. In that case, everyone switches over to the new blockchain and the old blockchain dies.
Image source: publicdomainpictures.net
Controversial Hard Fork
However, it might happen that it is unclear which of the two blockchains is the correct one.
If there's disagreement within the community about which of the chains the correct blockchain is, it is possible that both blockchains are supported. In this case we speak of a controversial hard fork. A controversial hard fork splits Bitcoin into two tokens.
Soft forks and hard forks are regularly discussed in the Bitcoin community. Due to compatibility with older versions, a soft fork is less profound and less dangerous than a hard fork. Making adjustments to the Bitcoin protocol using a soft fork is therefore preferred.