Next time try starting off a little more slowly.
Yet as common as they are, they're still somewhat of a mystery. The general consensus, though, is that a side stitch is a spasm of the diaphragm muscle. Unfortunately, there's not all that much you can do to prevent them. If you tend to get one when you're working out at a particular level of exertion, you might try reducing your regular pace a bit to see if that helps ward off the ache. When, despite your best efforts, you do get a stitch, slow down or walk for a few minutes until the ache goes away, then resume your regular pace.