As long as they are centralized entities then, this is what happens:
Mr X and Mr Y send their crypto to the exchange controlled wallets. The exchanges keep the record in their own DB/ledger who owns what. Then when Mr Y and Mr X make a trade the exchanges record that trade in their own DB/ledger and nothing is recorded on public blockchain. Now Mr X withdraws the crypto from one of the exchanges and it gets recorded on public blockchain (If he withdraws BTC then it will be recorded on BTC blockchain). So Mr X and Mr Y can do thousands of trades without paying network fees as everything happens in the exchange's internal system and they may have per trade fee.