Let's say bitcoin node has 100 blocks. Then he recieve another two blocks. Now it have 102 blocks. But now he recieve block 103. And this block is from another chain and our node have to remove blocks 101 and 102 and replace them with this chain with block 101, 102 and 103.
So now it must rewind UTXO set back to node 100 and update with transactions from newly recieved nodes 101..103.
How nodes making this rollback in utxo set?