Constipation occurs when bowel movements become less frequent and stools become difficult to pass. It happens most often due to changes in diet or routine, or due to inadequate intake of fiber. You should call your doctor if you have severe pain, blood in your stools, or constipation that lasts longer than three weeks.