Could be a stomach flu or caused by something you ate.
Since you have both diarrhea and vomiting, you are at risk to get dehydrated.
Try to slowly sip Sprite or vernors. Try to decarbonate it first by pouring a small amount in a glass and swishing it with a straw or spoon.
Then only take a small sip every 15-20 mins. until the vomiting and diarrhea stops.
If you continue to have these problems for even 2 days, you should see your doctor to make sure you have not become dehydrated (it can be life-threatening).
And of course, if your symtoms worsen or you start feeling light-headed or weak you need to be seen asap.