Constipation can have a variety of causes—poor diet, dehydration, certain medications, illness, mental disorders, or diseases affecting the nervous system or digestive system. Knowing what is causing your constipation can help you to know best how to treat it. In most cases (unless a chronic digestive issue causes it), drinking more water, eating more fiber-rich foods, and avoiding foods that contribute to constipation can help to relieve symptoms.