The final stages of digestion take place in the colon.  There, water from the undigested food is gradually reabsorbed until a solid stool is formed.  The stool is pushed through the digestive tract by small muscle contractions known as peristalsis.  Constipation can occur if too much water is absorbed or if peristalsis is slowed.  Constipation can also be caused by a diet low in fiber or emotional stress.  Watch this video to better understand the causes of constipation.