You've taken your dog for a walk, you've just finished telling the neighbour how well behaved he is and all of a sudden you catch him eating dog poo. Ugh! What could possess him to do this?
Coprophagia (the technical term for faeces eating) is unpleasant but not uncommon behaviour among dogs. The good news is that eating faeces won't generally hurt your dog. The bad news you already know; it's disgusting, messy and leads to the worst bad breath imaginable. There's also the risk of acquiring parasites if your dog eats faeces from other animals.
Curiosity
No one is entirely sure why dogs do this but there are a couple of possible reasons. It may simply be that they enjoy it. Dogs interact with the world through their mouths, they like to carry sticks and love to chew on toys or bones.
Dogs also like things that have strong smells and excrement certainly falls into this category. It might seem odd, but eating faeces my just be your dog's way of examining something that interests him.
Confused pups
Puppies will sometimes eat their own poo during toilet training. It happens because they're still unsure of where they're supposed to defecate and where they're not supposed to defecate. Afraid they may have done something wrong they will 'destroy the evidence'. This kind of cleaning behaviour can also happen with adult dogs inside the house.
Mother dogs will frequently eat their puppy's faeces when cleaning them. This is possibly a residual instinct. In the wild, eating the puppy poo would reduce the likelihood of predators finding her vulnerable offspring.
Diet deficiencies
One of the most common theories for why dogs behave like this, is that they're compensating for deficiencies in their diet. The faeces of herbivores may provide vitamins that aren't part of your dog's regular diet.
Cat food is high in protein and so cat litter may prove appealing to your dog. You must curb this behaviour immediately, as cat litter can be toxic for a dog.
Prevention
The easiest way to deal with the problem is simply to try and pick up as soon as your dog has done his business. Some people suggest sprinkling pepper, Tabasco or paraffin on the faeces to make it taste 'worse'.
There are also additives for your dog's food that will taste fine on the way in, but become bitter when digested so the faeces becomes unpalatable. Unfortunately, these methods aren't effective for all dogs.
To deal with coprophagia in general, the best solution is to be gentle but firm in discouraging it and above all, to be consistent in your discipline.
Also, talk to your vet, who will be able to identify if your dog has additional dietary needs.