How Does a Transaction Move from the Mempool to the Blockchain?
A transaction moves from the mempool to the blockchain when a miner selects it and includes it in a block they successfully mine. Once the miner broadcasts the block and it is validated and accepted by the majority of the network nodes, the transaction is confirmed and permanently recorded on the blockchain.
It is then removed from the mempools of all nodes.