Constipation happens because your colon absorbs too much water from waste (stool/poop), which dries out the stool making it hard in consistency and difficult to push out of the body.
To back up a bit, as food normally moves through the digestive tract, nutrients are absorbed. The partially digested food (waste) that remains moves from the small intestine to the large intestine, also called the colon. The colon absorbs water from this waste, which creates a solid matter called stool. If you have constipation, food may move too slowly through the digestive tract. This gives the colon more time – too much time – to absorb water from the waste. The stool becomes dry, hard, and difficult to push out.