First thing you should do when you have an upset stomach is to try making yourself vomit by gagging yourself or sticking your finger into your mouth.
If you can force yourself to throw up it will usually get rid of the stuff in your stomach that is making your stomach hurt and that will usually relieve the upset stomach.
You can also drink some Tea to settle an upset stomach including Peppermint or Chamomile Tea as those are two bests teas for relieving an upset stomach.
Taking some Pepto Bismol either in the liquid form or Tablet Form can help settle an Upset Stomach and 7 Up is also good when you have an upset stomach.