A CEX is short for Centralized Exchange and a DEX is short for Decentralized Exchange. The main difference between the two is that a CEX has a central party controlling the exchange and thus also the private key of your crypto assets. When you use a DEX it is interacting with your self-custody wallet using smart contracts. Both have their own pros and cons.