If a block chain is considered invalid, how about transactions in this block chain? Say if at current time there exist split of block chain, we call them A and B. A is "longer" then B, as the result B will be eventually forgotten, but what happened about the transactions in blocks on B? The block which is different between A will be unpacked, reconfirm the transaction then create new block, add new block on A?
Any transactions in a block that is no longer part of the longest chain will revert to unconfirmed (assuming they're not in the new longest chain) and return to the mempool. In most cases, assuming the transactions remain valid (i.e. the outputs they spend aren't already spent in the new longest chain), said transactions will simply be mined into a new block on the longest chain.