The Oort cloud is a huge spherical cloud of some 1012 comets surrounding the solar system and extending halfway to the nearest stars. We believe that the Oort cloud comets originated as icy planetesimals between the orbits of Jupiter, Saturn, Uranus and Neptune, and were dynamically ejected to their current distant orbits by gravitational interactions with those giant planets.
The ejection process scatters the comets not only to large orbits but also to moderately large inclinations, on the order of 20 or 30 degrees. Once in the Oort cloud, gravitational perturbations from random passing stars, from encounters with giant molecular clouds in the galaxy, and from the galactic tide continue to modify the cometary orbits. Because these perturbations occur when the comets are close to aphelion (the farthest point from the sun) in their very eccentric orbits, they are most effective at changing the angular momentum of the orbit. The angular momentum figures most importantly in determining the perihelion distance of the comet (the point at which it is nearest to the sun) and its orbital inclination. As a result, the perihelia of the comets tend to diffuse away from the planetary region and the inclinations of the orbits continue to grow.
As an example, a comet with a perihelion distance of about 10 astronomical units (AU), near the orbit of Saturn, and an aphelion distance of 50,000 AU, typical for the Oort cloud, moves at a velocity of only 2.7 meters per second at aphelion. A one-solar-mass star passing at a distance of 1 parsec (206,265 AU) at a velocity of 30 kilometers per second will perturb the velocity of the comet by about 0.29 meter per second. That is enough to raise the perihelion distance to 12.3 AU or to increase the orbital inclination by about six degrees. Because a comet will receive on the order of 40,000 such perturbations over its lifetime, it is easy to see how the inclinations and perihelion distances of the orbits can be completely randomized. The result is a spherical Oort cloud.
Answer originally posted March 4, 2002