Transaction 1: Your deposit to the swaps platform.
Transaction 2: The swaps platform transfers coins to a liquidity provider.
Transaction 3: The liquidity provider exchanges coin A to coin B.
Transaction 4: Coin B is sent back to the swaps platform.
Transaction 5: The swaps platform sends the coins to your address.
I am not sure about the last step. Maybe the 3rd-party sends the coins directly to your address. Anyways, there could actually be more transactions if you are exchanging two unknown altcoins one for the other and there is no such trading pair available. In that case, the instant exchange would first need to have its partners swap the unknown coin for something familiar like BTC, USDT, or ETH, for example, and then get the asset you want in the following transaction.
In fact, that's the same way that swaps work on some of the services on Ledger Live or Trezor Suite. If you open the native apps, read the TOS, or initiate a crypto to crypto swap, you will come across information that 3rd-parties might ask you to verify your identity. Sometimes it works without it, other times it doesn't. It probably depends on the amount and the history of the coins.