Forks can occur from two different events. An accidental fork occurs if coin updates are not truly compatible. People using different versions of the software create two different ledgersone from the older version, and one from the newer version. In this circumstance the coin developer must rapidly eliminate the bugs causing the incompatibilities and decide how to merge the different blockchains.
A hard fork is generated when the cryptocurrencys developers decide that changes must be made to the programming of the coin that will create incompatibilities between the older and newer version. When the changes are made, all users of that coin must willing to update all applications to continue to use that coin type correctly.
If this is confusing, let us use Microsoft Word for example. Microsoft frequently releases new versions of Word. Each version attempts to be backwards compatible and retain the ability to read and edit older documents. However, often older versions of Word have great difficulty in reading documents created in one of the newer versions. So if you create a document in Word 2007 and your buddy edits and saves it in Word 2013, you may have problems reading it. Despite the assumption that its going to be the same document, you two have created a fork in your document.
You can read more about it at Here's the great project for basic reading [bitcoinwiki.org](
https://en.bitcoinwiki.org/wiki/Main_Page)