There is a condition called IBS - irritable bowel syndrome , which presents with similar symptoms
This is curable with Ayurveda medicines. You have to be prepared for a few months of treatment
Next Steps
Diet - buttermilk , fruits, are Highly recommend. they will soothe the gut and increase the good bacteria in your gut that will help improve your condition
spicy food and oily food are gut irritants. avoid them
Health Tips
stress, fear , anxiety are known to trigger diarrhoea episodes. if you have any of the above issues, I suggest you turn to Pranayama and yoga for effective stress/anxiety management