The work a node does to replace the last blocks when it realises to be in a fork of the blockchain as it receives a new chain that’s longer (has higher cumulative difficulty) than its current active chain. Reorganisations happen when a node realises that what it thought was the canonical chain turned out not to be. When this happens, the blocks in the latter part of its chain (i.e. the most recent transactions) are reverted and the transactions in the newer replaced blocks are executed. All reorgs have a “depth,” which is the number of blocks that were replaced, and a “length,” which is the number of new blocks that did the replacing.