A comet tail and coma are visible features of a comet when they are illuminated by the Sun and may become visible from Earth when a comet passes through the inner Solar System. As a comet approaches the inner Solar System, solar radiation causes the volatile materials within the comet to vaporize and stream out of the nucleus, carrying dust away with them.
Comet Lovejoy photographed in 2011 by astronaut Dan C. Burbank from the ISS
Comet Holmes (17P/Holmes) in 2007, showing blue ionized gas tail on right
Showing how a comet may appear to exhibit a short tail pointing in the opposite direction to its type II or dust tail as viewed from Earth i.e. an antitail
The coma is the nebulous envelope around the nucleus of a comet, formed when the comet passes near the Sun in its highly elliptical orbit. As the comet warms, parts of it sublimate; this gives a comet a diffuse appearance when viewed through telescopes and distinguishes it from stars. The word coma comes from the Greek κόμη (kómē), which means "hair" and is the origin of the word comet itself.
Structure of Comet Holmes in infrared, as seen by an infrared space telescope
Comet 17P/Holmes, 2007/11/02
Tempel 1 in X-ray light by Chandra
Artificially colored far-ultraviolet image (with film) of Comet Kohoutek (Skylab, 1973)