A hard fork is a fork of blockchain technology. It is a radical change to a network protocol that validates previously invalid blocks and transactions. The hard fork requires all nodes or users to be upgraded to the latest version of the protocol software.
A hard fork is when new versions of blockchain nodes accept older versions; this creates a permanent deviation from the previous version of the blockchain. Adding a new rule to the code basically creates a fork in the blockchain: one path follows the new, upgraded blockchain, and the other path continues along the old path.
A fork in the blockchain can occur on any cryptocurrency platform, not just bitcoin. Because blockchain and cryptocurrencies basically work the same no matter what cryptocurrency platform. We can think of blocks in the blockchain as cryptographic keys that move memory. Because miners on a blockchain set the rules that move memory on the network, they set each new rule.