It is hard to get around the fact that nearly all infant stools are foul-smelling to some degree. Particular differences result from diet, but the stink is always there.
One of the main reasons for foul-smelling stool in infants is feeding them table foods much earlier than they are ready for. Another reason could be an infection of the bowels but you would have to see a doctor to diagnose that.
The foul smell can simply just be caused by the diet. However, other reasons it would smell that way could be: Crohn's disease, cystic fibrosis, short bowel syndrome, or ulcerative colitis.