A Centralized Exchange (CEX) is an organization that coordinates cryptocurrency trading, which is created and run by a company. They are considered centralized entities as the owning company sets the trading fees and rules and controls all the transactions that go through it.
To use a CEX, users generally need to go through a KYC process and deposit their assets in a custodial wallet controlled by the CEX: private keys are not controlled by the user meaning the CEX has full control over its funds.
A Decentralized Exchange (DEX) is a cryptocurrency marketplace where transactions are trustless and executed through smart contracts. Generally, DEXs are accessed through non-custodial wallets in which users have full control over their funds and private keys.