You may have something called Irritable bowel syndrome( IBS) IBS is a term given to a functional bowel disorder that can cause constipation, diarrhea , either or… or both.. Try this, drink least 8 glasses of water per day. Purchase Bio- K ( available in the cold case of health food stores) , which is an excellent probiotic that will not only help with regularity but also improve your immune system, also purchase Benefiber..( Over the counter) and take it per package directions. This combined with Bio K will promote regular, productive, well formed, easy to pass stools and help eliminate abdominal bloating and gas. This protocol will resolve your issues fully.
Please let me know if I can help further