Comets are small, irregularly shaped bodies in the solar system composed mainly of ice and dust that typically measure a few kilometers across. They travel around the sun in very elliptical orbits that bring them very close to the Sun, and then send them out past Neptune. There are two categories of comet, based on the amount of time they take to orbit the Sun. Short-period comets take less than 200 years, and long-period comets take over 200 years, with some taking 100,000 to 1 million years to orbit the Sun. The short-period comets are found near the ecliptic, which means they are orbiting the Sun in same plane as the planets. The short-period comets are thought to originate in the Kuiper Belt, an area outside Neptune's orbit (from about 30 to 50 AU) that has many icy comet-like objects. The long-period comets tend to have orbits that are randomly oriented, and not necessarily anywhere near the ecliptic. They are thought to originate in the Oort cloud. The Oort cloud has never been observed, but is believed to have at least 1012 icy objects located between 3000 AU and 100,000 AU in a spherical distribution around the Sun.
As comets travel close to the Sun, the Sun's heat begins to vaporize the ices and causes them to form a fuzzy, luminous area of vaporized gas around the nucleus of the comet known as a coma. Outside the coma is a layer of hydrogen gas called a hydrogen halo which extends up to 1010 meters in diameter. The solar wind then blows these gases and dust particles away from the direction of the Sun causing two tails to form. These tails always point away from the Sun as the comet travels around it. One tail is called the ion tail and is made up of gases which have been broken apart into charged molecules and ions by the radiation from the Sun. Since the most common ion, CO+ scatters the blue light better than red light, to observers, this ion tail often appears blue. The other tail is called a dust tail and normally appears white. The dust in this tail is less strongly affected by the solar wind since the particles of dust are much larger than the ions in the ion tail. That is why the dust tail is usually curved rather than straight, and does not point directly away from the Sun, because it is also influenced by the motion of the comet. The tails of the comet can be extremely large and my extend a distance of up to 1 AU (the distance between the Earth and the Sun)! Both tails can be seen in the image of Comet Hale-Bopp to the right, taken by Malcom Ellis in England.
The Kuiper belt is a region between about 30 and 50 AU from the Sun in the plane of the ecliptic. It is believed to be where most of the trans-Neptunian objects are, including Pluto and several other recently discovered dwarf planets. It is also thought to be the origin of many of the solar system's short-period comets. There are several types of Kuiper belt objects, or KBOs. Classical KBOs orbit between 30 and 50 AU from the Sun with most between 42 and 48 AU. They tend to have orbital inclinations of less than 30°. Another type of KBO are called scattered KBOs which have much higher orbital eccentricities. They probably moved into these irregular orbits as a result of gravitational interactions with gas giants, especially Neptune. They are thought to be one source of short period comets. The last type of KBO are called resonant KBOs because these objects are in resonance orbits with Neptune. Many are in 3:2 orbital resonance with Neptune, while others are in 4:3, 5:3 or 2:1. These orbital resonances are relatively stable orbits, and prevent the objects being pushed out of orbit by Neptune's gravity. KBOs in a 3:2 resonance are called plutinos, named after Pluto.
The Oort cloud has never been observed but is thought to be a spherical distribution of icy objects like comets orbiting our Sun at distances between 3000 and 100,000 AU. It is also believed to be the origin of many of the long-period comets in the solar system. The objects in the Oort cloud probably formed closer to the Sun, around the present day orbits of Uranus and Neptune, and were then pushed out to their current positions by gravitational interactions with the planets. Astronomers theorize that there are approximately 1012 to 1013 members of the Oort cloud with a total mass of about 100 Earth masses. Objects within the Kuiper belt are affected by the gravitation of the planets. Further out, is a region of the Oort cloud from 50-2000 AU where objects are not affected by the planets. From 2,000-15,000 AU, objects in the cloud are affected by galactic tidal forces, and in the outer Oort cloud, from 15,000-100,000 AU, objects are affected by the gravity of other stars. Outside the Oort cloud, the Sun's gravitation is not strong enough to keep objects in orbit.