Constipation is a symptom, not a disease.
So, visiting a doctor and finding the underlying problem is important.
She/he will prescribe your some laxative.
Have you lost weight unintentionally?
Do you take some medicines currently?
Are you suffering from a certain metabolic, hormonal or neurological disorder?