There are 3 types of crypto exchanges: Centralized, Decentralized, and Peer2Peer. Note, some P2Ps do allow for Atomic Swaps.

Centralized Exchanges are the earliest version of exchanges. It is the kind of ecosystem built with trust as the backend. Here, the admin of the Exchange has direct control on trading All the data, funds are stored in the central server. i.e, the single pathway for data. It enables quick and easy data handling.

Decentralized Exchanges or DEX evolve with the primary concern of solving the problems and inconveniences in the centralized exchanges. This platform runs directly on the blockchain network. Here, trading happens automatically under smart contracts without the involvement of third parties.

Peer to Peer Exchanges adopt the decentralization concept, here the trading happens end to end. Here Escrow places the vital role, the escrow wallet is under the control of the admin. It is the major difference between DEX and Peer to peer exchanges.