A comet is an icy, small Solar System body that, when passing close to the Sun, warms and begins to release gases. This produces a visible atmosphere or coma, and sometimes also a tail.

Astronomers have identified three main parts of a comet: the nucleus, coma and tail. The tail section is broken into three parts. Some comets, when combined with their tails, can be longer than the distance from the Earth to the Sun.

Made up of ice, gas, rock and dust, the nucleus of a comet is located in the center of the head and is always frozen. The gaseous part of the nuclei is composed of carbon monoxide, carbon dioxide, methane and ammonia. Most of the comet's mass is located in the nucleus.

The comet's coma is made up primarily of gas and encompasses the nucleus. Carbon dioxide, ammonia, dust, water vapor and neutral gases make up the coma. Together with the nucleus, the coma forms the head of the comet. The coma is the most visible part of a comet.

Three tails either follow or guide the nucleus and coma. The ion, or plasma, tail is made up of charged ions that consistently face away from the Sun due to solar winds. Because of this, the ion tail leads the comet away from the Sun or it follows it towards the Sun.

The dust tail is long and wide. As the comet moves away from the Sun, the tail fades.

The envelope tail is composed of hydrogen gas and is usually located between the dust tail and ion tail. The tail appears larger when it is near the Sun.

More Info: en.wikipedia.org