There's a number of things that can be causing it but one of the main things is problems with the diaphragm; not getting enough blood supply to the diaphragm.
What could be happening if this happens to you regularly is that you are breathing incorrectly; so using the top third of your chest rather than learning to breathe deeply with using the diaphragm.
If you think this may be the cause there are some exercises you can do to make you more aware of your way of breathing and developing your belly breathing skills. (There are many other benefits to diaphragmatic breathing besides the side stitch watch this video on the importance correct breathing: Proper breathing technique
Try this, lie on the ground with one hand on your stomach and one hand on your chest. And then breathe in through your nose; it's important it's through your nose because there's a better connection when you breathe in through the nose for your diaphragm.
When you breathe in through the nose you see the belly rise before the chest. If the belly rises first before it goes to the chest then you'll know that you're diaphragmatically breathing.
Practising that for a few minutes a day will help strengthen the connection to your diaphragm and correct breathing technique.
Another exercises you can do at the beginning of the run. Before starting you will ideally do a very good warm-up if you're prone to stitch because you need to get the blood flowing and get into a good rhythm with your breathng, posture and form. Now fo the first five minutes what I'd like you to do and to try is breathing in through your nose and out through your mouth in a real rhythmic fashion. (the point is not to breath in using your mouth
You should be going at a level that's really, really slow to start off with; you might have to even walk in order to be able to get enough air in through the nose. But by practising that nasal breathing, in through the nose, out through the mouth, that will develop your respiratory muscles and also develop the conversation with the diaphragm so that you're breathing correctly.
Another thing to be aware of is your posture arms bent 90 degrees, hanging loosely from your shoulders, no tensing of the shoulders, relaxed hands not balled into fist. straight neck, leading with the solar plexis so the chest is held up nice and high. If you are slouched over and crumpled from the middle of the body with rounded shoulders you will have more difficulty breathing correctly and this leads into one of the other major reasons why this often happens and that is weak abdominals and particularly the oblique muscles so that you don't have too much rotation happening when you're running.
Check your hands or arms are not swinging across the bodies midline but rather like a straight pendulum from the shoulder, so if you draw a line right through the middle of the body, if your hands are crossing that, then that could be a reason why you get the stitch because you are twisting through the core.
Too much movement of the organs through the core can cause cramps, because there's not enough stability in there and you end up with cramping in that diaphragmatic area.
So I really highly recommend strength work, this is one of the reasons why at Running Hot Coaching we're so big on strength training and postural exercises, technique drills and mobility work because all of these play into each other and into the correct breathing side of things.
So make sure you're doing good core strength exercises, make sure you have got good, proper posture, so shoulder blades are back and down, chest is wide open.
Other common causes can be if you eat too soon before a run, that can cause a side stitch, so wait two to three hours before you actually go for a run (the exception is light snack).
If you do get the stitch, it's best to or you will be forced to slow down, take it down a gear, until you start to come right, put one arm behind your head so that you're opening up the chest and stretching out.
What's happening is that the area is cramping, so if you can open up that area, stop and walk for awhile with one hand behind your head so that you're opening up that chest cavity, or pushing hard with your hand against the sore area can also help.
Also, stopping and bending over forward to release that pressure and stop that cramping of those muscles, can really help, or doing some side stretching with your upper body from side to side with your hands over your head. All of these tips can help relieve it a lot quicker if it comes on.
If it's happening when you runs down hills; that would suggest to me that it's the jiggling and pounding of the organs being shaken around and if you haven't got a strong enough core that's keeping it really tightly engaged, there's too much movement of the organs inside.
So maybe just pull back on the pace a little bit until you get the core strength up to scratch and hopefully this will deal with the problem. The more that you runs, the more likely it is that this will problem will start to disappear, because you will start developing strength in the necessary areas.
I have had this happen to me even years into my training and at the peak of my career when I've been up in the Himalayas for example. I had a feeling as if someone had a fist right up inside my solar plexus but that was more to do with kidney problems so that's a more unusual reason for it.
But first of all I would look at the core, posture, breathing and to sum it all up, strengthen those diaphragmatic muscles, strengthen your abdominal muscles, especially your obliques, get your posture sorted, make sure you're not eating too close to running, learning and practice the nasal breathing exercise.