A Bitcoin mixer works by taking in Bitcoin from many different people and then sending out new Bitcoin to different addresses. This makes it difficult to trace the original transactions, as the funds have been mixed with the funds of many other people.
For example, imagine that Alice wants to send 1 Bitcoin to Bob. If Alice sends the Bitcoin directly from her wallet to Bob's wallet, the transaction will be recorded on the blockchain, which is a public ledger of all Bitcoin transactions. Anyone can see that Alice sent 1 Bitcoin to Bob, and they can also see the transaction history of both Alice's and Bob's Bitcoin addresses.
Now imagine that Alice uses a Bitcoin mixer to send the 1 Bitcoin to Bob. The mixer takes in Bitcoin from Alice and many other people, and then sends out new Bitcoin to different addresses. This makes it difficult to trace the original transactions, as the funds have been mixed with the funds of many other people. Therefore, it is more difficult to see that Alice sent 1 Bitcoin to Bob, as the transaction is mixed with many other transactions.
This privacy-enhancing technique used to mix Bitcoin transactions is referred to as CoinJoin. CoinJoin works by allowing multiple users to combine their Bitcoin transactions into a single transaction, making it more difficult to determine which input corresponds to which output.
With CoinJoin, the transactions can be combined into a single transaction with multiple inputs and outputs. This makes it more difficult to determine which input corresponds to which output.
Learn more about CoinJoin