CoinJoin makes anonymity possible by combining random Bitcoin transactions. The principle is that when you have lots of inputs from multiple addresses and lots of outputs to multiple addresses you can no longer determine what went where and from whom. The problem is that Coinjoin is potentially vulnerable to network analysis and therefore is pseudo anonymous.
Zerocoin originally was supposed to fix the anonymity issue of Bitcoin. The way it’s designed is you take original Bitcoins, turn them into Zerocoins, and then you turn them back into new Bitcoins in another wallet. Currently the technology is being refined to be more efficient; however it’s unlikely to be implemented in Bitcoin. Besides, one of the biggest criticisms of zerocoin is the added computation time required by the process. Also if the proofs (zero-knowledge proofs) were posted to the block chain, this would significantly increase the size of the blockchain.
Another method for anonymous transactions is Stealth Addresses but very few people actually use them. It's not very user friendly at this point in time and is considered rather experimental.
So as you see each of these technologies has its cons and pros. The one protocol that I haven’t mentioned yet is CryptoNote. To my knowledge CryptoNote is the most promising technology for anonymous transactions. The way the untraceable payments are executed there is through something called ring signatures. Here is an explanation of how it works https://cryptonote.org/inside/
Bytecoin (BCN) is the first cruptocurrency based on the CryptoNote protocol. It was launched in 2012.
http://bytecoin.org/