What's the real difference between CEX and DEX? The most fundamental, and the only one you must remember first, is "who holds your private key." A centralized exchange (CEX) is run by a company that holds your assets and key, and you merely hold a record that it owes you; a decentralized exchange (DEX) has no central custodian — you trade directly with smart contracts using your own wallet, with assets and key in your hands throughout. All other differences — KYC or not, convenience, what the risks look like — actually grow from this one fundamental difference.
What's the main risk of a CEX? It's "custody risk." Because the key is in the exchange's hands, the safety of your assets is entirely tied to that company. It may be mismanaged into collapse, breached by hackers, misappropriate client assets into risky bets, or freeze your account and withdrawals under regulatory or internal problems. History has seen more than once a large exchange collapse overnight with user assets unrecoverable. That's why veterans say "not your keys, not your coins" — coins on a CEX are, strictly, only a claim against the exchange.
A DEX has no exchange-runs-off risk, so is it safer? Not necessarily — the risk just shifts to another set. On a DEX, no one can freeze you or abscond with your funds, but you face: the smart contract itself may have exploitable bugs and the whole pool can be drained; you may sign a malicious approval while interacting and get phished out of your tokens; the skill bar is higher, and a wrong address or wrong slippage setting can cause loss; obscure coins have thin liquidity, so a single trade slips heavily. In other words, a DEX swaps "trusting the exchange" risk for "trusting the code plus relying entirely on yourself not to err" risk — security responsibility returns 100% to you.
Should a beginner use a CEX or a DEX? The answer isn't either/or but a division of labor by need. If you're new, need to buy with fiat, and want convenience and support, starting with a CEX is most reasonable. If you want to join on-chain DeFi, fully self-custody, or care about censorship resistance, you'll need to learn to use a DEX. Most mature users actually use both: a CEX for fiat ramps and large spot, a DEX for on-chain interaction. But whichever you use, one shared principle holds: exchanges and hot wallets are just tools — your truly long-term, large assets belong in a cold wallet where you control the keys.