In the context of bitcoin and cryptocurrency.
Fork has 2 main meanings.
First meaning is relating to code development and is shared with all software projects.
The code base of bitcoin can be forked to form the basis for the development of a new project. This has happened many times.
Second meaning specifically concerns blockchain based cryptocurrencies.
The blockchain is a data structure where each block is linked together with a cryptographic hashing function that allows the younger block to inherit a digital fingerprint of the data in its parent block.
The fork occurs at the tip of the blockchain where there are 2 child blocks that are created simultaneously, subsequently propagated throughout the network, creating a conflict of consensus.
Part of the network will then have a different copy of the blockchain than the other, and the network will continue creating new blocks until the chain with the most blocks is finally accepted by the entire network.
Such is the case with any fork that occurs where there isnt an intent to change the underlying policy of the network.
The other type of blockchain fork is the policy changin type of fork.
In a soft fork like segwit bip141 there is a policy change but the forked blockchain continues to run in parallel because it is backwards compatible. participants are free to move their bitcoins back and forth between segwit enabled and legacy addresses.
In the hard fork as with bitcoincash, There is a policy change that does not permit backwards compatibility. The tail of the blockchain is cloned so that participants of the original network will have an equivalent balance on the cloned chain. each version of the blockchain then eliminates their respective policy violating fork and continues to build itself as 2 separate blockchains.