If these problem come as from 1 - 3 month then it's acute problem and for cure and treatment you should follow good diet plan and medicine .
And if your problems are more than 3 month then it's known as irritable bowel syndrome and it take time to cure completely and for cure and treatment you should follow strict diet plans and treatment by a registered medical practitioner.
For best treatment tell complete history to doctor .
Next Steps
You should take consultation from Doctor to understand your disease and it's best treatment.
Health Tips
Don't take any medicine itself without advise of Doctor.