Working of crypto currency swaping (Exchanging) in Crypto exchange
Any service or exchange allowing conversion of one asset into another (whether it is decentralized or centralized), is eventually executing the trade on an orderbook with a large exchange or liquidity provider.

Larger exchanges like Coinbase, Binance, Bitstamp etc. operate their own orderbooks, which have liquidity from users and market makers.

Second tier services like Shapeshift, Changelly etc. maintain balances in all the coins they support on larger services, and when a user wishes to convert an asset, they will execute a corresponding trade on these services.