Welcome to Health Care Magic
Your description suggests cute gastro-enteritis
. It could be viral or allergic.
Most of them settle down in a day or so.
Drink enough fluids - to avoid dehydration
Depending on age, travel, habits and so on, there could be several other causes.
It will be better to see a doctor. Id should be early, if you have fever
, blood in the stools or dehydration.
Wishing you speedy recovery