To truly appreciate the orbits of comets, it helps to have an understanding of planetary orbits. Even though there's no lack of available space around the sun, the planets all confine themselves to a fairly thin band, and none of them, except for Pluto, stray more than a few degrees outside it.
The orbit of a comet, on the other hand, can have a large angle of inclination relative to this band and may even orbit perpendicularly to it, depending on where it comes from. That's just one of many interesting comet facts.
According to Kepler's first law, all objects orbit the sun in elliptical paths. The orbits of the planets, except for Pluto, are almost circular, and so are those of asteroids and icy objects in the Kuiper belt, which is just beyond the orbit of Neptune. Comets that originate in the Kuiper belt are known as short period comets and tend to remain in the same narrow band as the planets.
Long period comets, which originate in the Oort cloud, which is beyond the Kuiper belt and on the outskirts of the solar system, are a different matter. Their orbits can be so elliptical that the comets can completely disappear for hundreds of years. Comets from beyond the Oort cloud can even have parabolic orbits, meaning they make a single appearance in the solar system and never come back again.
None of this behavior is mysterious once you understand how planets and comets came to be there in the first place. It all has to do with the birth of the sun.
It All Started in a Cloud of Dust
The same process of star birth that scientists today are able to observe happening in the Orion Nebula occurred in our vicinity of the universe some 5 billion years ago. A cloud of space dust, floating uneventfully in the vast nothingness, gradually began to contract under the force of gravity. Small clumps formed, and they stuck together, forming larger clumps which were able to attract even more dust.
Gradually, one of these clusters predominated, and as it continued to attract more material and grow, conservation of angular momentum caused it to spin, and all the matter around it formed into a disk that spun in the same direction.
Eventually, the pressure at the core of the predominant cluster became so great that it ignited, and the the outward pressure created by hydrogen fusion prevented more matter from accreting. Our young sun had reached its final mass.
What happened to all the smaller clusters that hadn't been trapped in the central one? They continued to attract the matter that was close enough to their orbits, and some of them grew into planets.
Other, smaller clusters, on the very edge of the spinning disk, were far enough away to avoid being caught in the disk, although they were still subject to enough gravitational force to keep them in orbit. These small objects became dwarf planets and asteroids, and some became comets.
Comets Are Not Asteroids
The composition of comets is different from that of asteroids. Whereas an asteroid is mostly rock, a comet is essentially a dirty snowball filled with pockets of space gas.
A large number of asteroids are found in the asteroid belt between the orbits of Mars and Jupiter, which is also home to the dwarf planet Ceres, but they also orbit on the outskirts of the solar system. Comets, on the other hand, tend to come exclusively from the Kuiper belt and beyond.
A comet that is far from the sun is virtually indistinguishable from an asteroid. When its orbit brings it close to the sun, though, the heat vaporizes the ice, and the vapor expands to form a cloud around the nucleus. The nucleus may be only a few kilometers across, but the cloud can be thousands of times larger, making the comet appear much larger than it actually is.
A comet's tail is its most defining characteristic. It can be long enough to span the distance between the Earth and the sun, and it always points away from the sun, no matter which direction the comet is traveling. That's because it's created by the solar wind, which is blowing gas away from the vapor cloud that surrounds the nucleus.
Comet Facts: Not All Come From Here
Long period comets can have highly elliptical orbits that can be so eccentric that the period between sightings from Earth can be more than a lifetime. Kepler's second law implies that objects move more slowly when they are farther from the sun than when they are close to it, so comets tend to be invisible far longer than they are visible. However, no matter how long it takes, an object in orbit always returns, unless something bumps it out of its orbit.
Some objects never do return, though. They come from seemingly nowhere, traveling at speeds atypical of orbiting bodies, whipping around the sun and shooting off into space. These objects don't originate in the solar system; they come from interstellar space. Rather than an elliptical orbit, they follow a parabolic path.
The mysterious cigar-shaped asteroid 'Oumuamua was one such object. It appeared in the solar system in January 2017 and went out of sight a year later. Perhaps it was a UFO, but more likely, it was an interstellar object attracted to the sun but moving too fast to be coaxed into orbit.
A Case Study: Halley's Comet
Halley's comet is perhaps the best-known of all comets. It was discovered by Edmund Halley, a British astronomer who was a friend of Sir Isaac Newton. He was the first person to postulate that comet sightings in 1531, 1607 and 1682 had all been of the same comet, and he predicted its return in 1758.
He was proven right when the comet made a spectacular appearance on Christmas night in 1758. That night was, unfortunately, 16 years after his death.
Halley's comet has a period between 74 and 79 years. The uncertainty is due to gravitational influences it encounters along it path – particularly the planet Venus – and to an intrinsic propulsion system that all comets possess. When a comet like Halley's comet approaches the sun, the pockets of gas in the core expand and shoot through weak spots in the core, providing thrust that can push it in any direction and create perturbations in its orbit.
Astronomers have mapped the orbit of Halley's comet and found it to be highly elliptical, with an eccentricity of almost 0.97. (Eccentricity in this case means how oblong or round an orbit is; the closer to zero the eccentricity, the rounder the orbit.)
Considering that Earth's orbit has an eccentricity of 0.02, which makes it almost circular, and that the eccentricity of Pluto's orbit is only 0.25, the eccentricity of Halley's comet is extreme. At aphelion, it is well outside the orbit of Pluto, and at perihelion, it is just 0.6 AU from the sun.
Clues of Comet Origin
The orbit of Halley's comet is not just eccentric, but it is also tilted at 18 degrees with respect to the plane of the ecliptic. This is evidence that it wasn't formed in the same way the planets were formed, even though it may have coalesced around the same time. It could even have had its origins in another part of the galaxy and simply gotten caught by the sun's gravity as it was passing by.
Halley's comet displays another characteristic that is different from the planets. It rotates in a direction opposite that of its orbit. Venus is the only planet that does this, and Venus revolves so slowly that astronomers suspect it collided with something in its past. The fact that Halley's comet revolves in the direction it does is more evidence that it wasn't formed in the same way as the planets.