In order to reach a consensus on which blockchain is the real one, every network participant agrees to follow a simple rule that the ‘real’ chain is the longest one you can find. If a node in the network could see every other node (forming a complete graph) you could just check which is the longest and accept it as a reality. Unfortunately, due to real life constraints a node is not connected to every other node and so has a limited visibility of the graph. This means that at any given time, a longer blockchain might exist that you are not aware of but the idea is that you will eventually get to the longest chain if you just follow the rule to switch to the longer one if you find it.

Chain Reorgs

Consider a scenario where we have 2 sub-graphs of nodes where a node from graph A does not communicate with any node from graph B meaning the graphs are building 2 different blockchains. Each has it’s own reality of what the ‘real’ blockchain is and if each sub-graph mines 2 blocks, eventually when they find each other one of them will be longer and the other one will be thrown away — because of the rule we mentioned above that the longest chain automatically wins. In the case if node A was longer when they met, node from graph B has to reorganize its chain which makes it lose the two blocks it mined because they are not a part of the chain of node from graph A. This happens ...