DEX (Decentralized exchange) or decentralized exchange, in which all transactions take place automatically and directly between users (peer-to-peer network), without having to rely on an intermediary to avoid security risks, hackers or scams.
In CEX (Centralized exchange), when users make transactions, they have to deposit an amount of money (transfer via bank or credit/debit card) or cryptocurrency to the CEX, it means, they give up their control of their assets. When users withdraw, they ask the exchange to sign a transaction on their behalves. CEXs have the ability to manipulate and use users' assets, have the ability to create fake coins, adjust market trends for profit.
In DEX, orders are executed on-chain with smart-contract and atomic-swap user do not lost control of their funds