The 2-Way Peg is a method to transfer BTC into RBTC and vice-versa. In practice, when BTC are exchanged for RBTC, no currency is “transferred” between blockchains.
There is no single transaction that does the job. This is because Bitcoin cannot verify the authenticity of balances on another blockchain.
When a user intends to convert BTC to RBTC, some BTC are locked in Bitcoin Blockchain and the same amount of RBTC is unlocked in RSK.
When RBTC needs to be converted back into BTC, the RBTC get locked again in RSK and the same amount of BTC are unlocked in the Bitcoin blockchain. A security protocol ensures that the same Bitcoins cannot be unlocked on both blockchains at the same time.