the behaviour is called Coprophagia, when its a puppy it can be a normal behaviour the mum eats the pups stools so its a case of monkey see monkey do! sometimes this habbit persists but usuallt dies as it gets older.
first a vet can rule out any medical condition, such as a pancreatic problem. punishment fot house soiling can also be a cause the dog will try to remove the evedience so they are not punished, a mal-absorption problem would be quickly spotted by the vet and is the most likely cause in older dogs, a poor diet and a low quality food may also be causeing the problem.
Hope this helps
Sam
~