Generally, there are two types of forks: 'Soft Fork' and 'Hard Fork'
A 'Soft Fork' refers to a backward-compatible method of upgrading a blockchain; that is, the new version of the blockchain can still recognize and validate transactions from the old version. However, transactions from the new version may not be recognized by the old one. This means that users of the old version can still participate in validating transactions, but they risk breaking the rules of the newly updated blockchain, which may invalidate their transactions.
On the other hand, a 'Hard Fork' represents a permanent divergence from the previous version of the blockchain, and nodes running previous versions will no longer be accepted by the newer version. This means a full upgrade of the software is required. In most cases, a hard fork is implemented to rectify security risks found in older versions of the software, to add new functionality, or to reverse transactions (like The DAO hard fork in Ethereum blockchain).
The need for a fork can arise due to several reasons such as:
The implementation of a fork, whether a soft or hard fork, affects the community of the particular cryptocurrency and therefore usually goes through a process of discussion and consensus before it is carried out. This helps ensure that a majority of the community is on board with the proposed changes, thus minimizing fragmentation and conflict within the community.