Forks can occur for two different reasons. If two miners find a valid hash within a short space of time, this can cause an accidental fork. If this happens, the network will temporarily split in two – with one half thinking one block is next to be included in the blockchain ledger, and the other half thinking it is a different block. An accidental fork is almost always resolved quickly, as soon as one chain has more proof of work than the other.
A hard fork occurs when developers create a permanent divergence in the blockchain that will create incompatibilities between old and new versions. It requires all nodes or users to be in agreement and upgrade to the latest version, or, accept that the fork will result in two separate chains/currencies.