I am happy to help you, and am sorry you are feeling bad.
It sounds like you could have gastroenteritis.
This is a inflamation or infection in the stomach also called the stomach flu.
Causes of this can be from viruses, bacteria or parasites.
IT could also be food poisoning.
Try to follow the BRAT diet to give your stomach a rest.
avoid sugary things as that can make diarrhea worse.
It you feel like the pain is severe and is non stop or you are getting dehydrated go to the ER.
Depending on the cause the duration can be as short as 24 hours or as long as a week.
Try to keep drinking fluids.
Your doctor can test a stool specimen to see the cause.
Hope you feel better soon,
Bless your heart!