Comets are made up of ice, dust, and frozen gases, so as the comet gets closer to the sun, heat and solar wind cause the gases and dust to burn. This creates the comet's tail, which forms away from the sun. Regardless of which direction the comet is travelling, comet tails will always point away from the sun because of the radiation pressure of sunlight.

Comets move across the sky millions of miles above Earth's atmosphere. They travel along the orbit of the sun, which is why it is possible to name and recognise comets that return after several years or decades. Halley's Comet, for example, returns to the Earth's vicinity every 75 years.

Scientists believe there are two regions of the solar system that produce comets. One is the Kuiper Belt and the other is the Oort Cloud. The latter is farther from the solar system, therefore takes longer to orbit the sun.

More Info: www.sciencedirect.com