Thanks for your query.
They are having diarrhea
which is mostly viral in nature and takes few days to subside.
Most important is to maintain hydration.
I suggest you to give oral rehydration solution sip by sip after each loose stool
.give lemonade,curd,boiled potato,banana,rice porridge.
Give lactobaccilus for 2 to 3 days.
In case symptoms persist get them evaluated by pediatrician
for proper management.