What Is a Hard Fork?
A hard fork (or sometimes hardfork), as it relates to blockchain technology, is a radical change to the protocol that makes previously invalid blocks/transactions valid (or vice-versa). A hard fork requires all nodes or users to upgrade to the latest version of the protocol software.
Understanding a Hard Fork
Put differently, a hard fork is a permanent divergence from the previous version of the blockchain, and nodes running previous versions will no longer be accepted by the newest version.
This essentially creates a fork in the blockchain: one path follows the new, upgraded blockchain, and the other path continues along the old path. Generally, after a short period of time, those on the old chain will realize that their version of the blockchain is outdated or irrelevant and quickly upgrade to the latest version.
A hard fork involves splitting the path of a blockchain by invalidating transactions confirmed by nodes that have not been upgraded to the new version of the protocol software.
A hard fork can be implemented to correct important security risks found in older versions of the software, to add new functionality, or to reverse transactions (as in the case with the hard fork to reverse the hack on the DAO (decentralized autonomous organization) in the Ethereum blockchain).
Following the hack on the DAO, the Ethereum community almost unanimously voted in favor of a hard fork in order to roll back transactions that siphoned off tens of millions of dollars worth of digital currency by an anonymous hacker. The hard fork also allowed DAO token holders to get their ether funds returned to them.
The proposal did not exactly unwind the network’s transaction history. Rather, it relocated the funds tied to The DAO to a newly created smart contract with the single purpose of letting the original owners withdraw them. DAO token holders will be able to withdraw ETH at a rate of approximately 1 ETH to 100 DAO.
The extra balance and any ether that remains as a result of the re-entrancy exploit and the splitting mechanism will be withdrawn and distributed by the DAO curators, or individuals selected prior to the collapse of the DAO to provide "failsafe protection" for the organization.
Hard Forks vs. Soft Forks
Hard forks and soft forks are essentially the same thing in that when a cryptocurrency's existing code is changed, an old version remains while a new version is created. However, with a soft fork, only one blockchain will remain valid as users adopt the update. Both forks create a split, but a hard fork creates two blockchains, and a soft fork is meant to result in one.
Considering the differences in security between the two, almost all users and developers call for a hard fork when a soft fork seems like it could do the job. Overhauling the blocks in a blockchain requires a tremendous amount of computing power, but the privacy gained from a hard fork makes more sense than a soft one.