Constipation can be treated with fiber supplements, probiotics, laxatives, enemas, and prescription medications. The best way to avoid constipation is to consume a diet high in fiber. For fast relief, take an over-the-counter laxative. You can also try consuming a meal or snack of high-fiber foods, such as fruit, vegetables, beans, or drinking tea containing anise or fennel.