Highly eccentric orbits
Comets travel on long, stretched ellipses with high orbital eccentricity, swinging close to the Sun at perihelion and then retreating far into the outer solar system at aphelion. Short-period comets (orbits under 200 years) largely originate in the Kuiper Belt, while long-period comets come from the distant Oort Cloud and can take thousands of years to return. Halley, with its roughly 76-year orbit, is the best-known Halley-type comet, a short-period comet whose steep, retrograde orbit points to an Oort Cloud origin rather than the Kuiper Belt.
Because the orbit is so elongated, a comet spends most of its life in the cold outer reaches as an inert nucleus and is only briefly active near the Sun.
Nucleus, coma, and tails
The nucleus is a small body of ice, dust, and rock, often described as a dirty snowball, typically a few kilometers across. As the comet nears the Sun, solar heat sublimates its ices, releasing gas and dust that form a glowing cloud called the coma around the nucleus.
Two tails then develop. The ion tail, made of charged gas, is pushed straight away from the Sun by the solar wind. The dust tail curves along the orbit. Both grow as the comet approaches perihelion and fade as it recedes, which is why a comet always points its tail away from the Sun rather than trailing its motion.