The classic mixer, also called a tumbler, is simple and a little nerve-racking: you send your bitcoin to an operator, the operator sends back different bitcoin from its pool minus a fee, ideally split up and delayed. If it works, the chain shows no direct link between what went in and what came out.
The obvious problem is trust. A custodial mixer holds your money and could keep it, log everything, or be run by police. Several have been. US authorities prosecuted the operators of Helix and Bitcoin Fog, and investigators have recovered records from seized mixers that linked users to their deposits.
Non-custodial designs try to remove that trust. CoinJoin coordinates a joint transaction where nobody holds your coins, and Tornado Cash used Ethereum smart contracts and zero-knowledge proofs. Both have faced their own legal trouble: Tornado Cash was placed under US sanctions in 2022 (later lifted), and its developers have faced criminal cases.
Using a mixer isn't illegal in most places, but laundering money through one is, and exchanges often treat mixed coins with suspicion. Expect questions if you deposit them.