The Kirkwood gaps occur in the distribution of semimajor axes among the asteroids populating the belt between Mars and Jupiter. These gaps are present where asteroids are in orbital resonance with Jupiter, that is, when the ratio of the Jupiter period to the asteroid period is a simple fraction. An orbital period is directly related to the semimajor axis by Kepler's Third Law of planetary motion. The purpose of this paper is to study how an asteroid orbiting in one of the gaps is affected by this resonance and therefore discover how the Kirkwood gaps are formed. A computer simulation was written to model these orbits and from this simulation the following conclusions were drawn. The orbital characterisitics of an asteroid are conserved over time but the orbit precesses. This precesssion, theoretically, is what causes the gaps to form because precession increases the probability that the path of the asteroid's orbit will be affected by Earth, Mars, or Jupiter. Consequently, gaps were formed where these resonances occur; where asteroids are not in resonance precession does not occur and, therefore, a gap is not formed.