A hard fork is a type of fork that brings about a protocol change that isn’t backwards compatible. It is essentially a new cryptocurrency. When there is consensus around a hard fork, the new chain can still be considered the main chain. The miners will then all move across to mining the new chain. A good example of this is Ethereum. After the Dao attack, a hard fork was performed to return the stolen coins. Ethereum Classic is actually the original Ethereum chain, but because the majority of miners and the main developers moved across to the new chain, we consider this the main chain. Ethereum Classic has millions in stolen coins reflected in its history. Both histories can’t be correct, so this is why a hard fork was needed.