Source: EZNC
Coprophagy, derived from the Greek kopros (feces) and phagein (to eat), is the scientific name for the consuming of feces. For some animals, such as rabbits, hamsters and guinea pigs, coprophagy is a normal part of the digestion process.
Coprophagy adds valuable vitamin B to the diet, formed in the blind gut. The droppings from the blind gut are small and dark and a little softer than the other droppings. These droppings are eaten straight from the rectum. All of the droppings in the cage can therefore safely be removed.

Coprophagy also occurs in dogs. But not as a normal part of the digestion process. A difference is also being made between eating the feces of other animal species (such as cats, rabbits, horses and humans) or eating dog feces (own feces of that of another dog).
Nursing dogs eat the feces of their litter in order to keep the nest clean. This kind of behavior is normal. In other cases, it isn’t. Reasons for coprophagy may be: boredom, stress, poor hygiene or a disruption in the dog’s metabolism.

Eating the feces of horses may be dangerous for dogs. Horses are regularly dewormed. Their feces may contain deworming agents of worm eggs. Both can be damaging or even fatal for dogs.

More information on coprophagy in dogs can be found on the internet or through your local vet.