Sides stitches hurt! If you have never had one, you are lucky!
A "side stitch" is a sharp, intense pain under the lower edge of the ribcage that occurs while running. It most often happens to "unconditioned" runners, but it is sometimes experienced by veterans. There are a number of theories for the cause of this condition, including a cramp in the diaphragm or air trapped in the lung.
The diaphragm is the large muscle separating the abdomen from the chest cavity. It moves up on the exhale and down on the inhale. Either having some trapped air/gas or over-exercising the diaphragm may bring on the cramp causing the pain. The cramps occur more often under the right side ribs. It is possible that this is associated with the liver and its larger right side lobe.
How do you cure the problem?
As with any muscle cramp, the best immediate treatment is to stretch the cramping muscle as much as possible. To stretch the diaphragm, one needs to alter their breathing pattern. This can be accomplished by breathing in as hard and as deep as possible. Suck in as much air as possible, trying to force the diaphragm down. Hold the breath for a couple of seconds and then forcibly exhale through pursed lips to restrict the outward air flow. Work, bending forward if necessary, to get as much air out of the lungs as possible. This will force the diaphragm upward adding to the stretching action. It may take three or four of these "in and outs" to get rid of the cramp. It is possible to do this while running--you may have to slow down, but if in a race you may not want to stop.
Some athletes have had some degree of success by running the fingers into the abdomen and forcing them up under the ribcage and into the cramping muscle thereby stretching it.
Neither of these methods are guaranteed to work, but they do have a pretty high success rate. Hope that you never have the problem, but if you do, try one or both of them.