Comets are lumps of frozen water ice, gas and dust. As a comet approaches the Sun, it starts to heat up. The ice transforms directly from a solid to a vapor, releasing the dust particles embedded inside. Sunlight and the stream of charged particles flowing from the Sun – the solar wind – sweeps the evaporated material and dust back in a long tail. The comet's ingredients determine the types and number of tails.
HubbleSite and STScI are not responsible for content found outside of hubblesite.org and stsci.edu