Comets are small (more or less town-sized) chunks of frozen liquids and gases. They have highly elongated orbits that bring them near the sun and take them far from the sun, generally speaking. As the comet nears the sun the solar radiation melts the gases and pushes them away, forming a tail, two tails really, one of gas and one of dust.
Kepler's second law tells us that the comet is moving much more quickly when near the sun and thus, spends a tiny fraction of any orbit near the sun outgassing. It freezes back up as it heads to the outer solar system where it crawls slowly along its orbit. We see the comet both because it reflects sunlight and the emitted gases glow as electrons make transitions to lower energy states. How bright the comet appears to us is strongly dependent upon how much material it has released and that can be a highly unpredictable quantity, even without Principal Skinner getting back at Principal Kahoutek, "him and that little boy of his."
In fall of 2007 Comet Holmes put on a surprise show as it had an outburst of material, causing it to brighten suddenly. The above image was taken on October 31, 2007. The image just below was taken a day later on November 1. The image below was taken on November 12. Each image is the sum of 15 5.0-second images. Notice how much the comet had faded by November 12, although one must be aware that the transparency on this night might not match that of the earlier nights. No inter-night normalization was attempted for these images. Nonetheless, the sense of dissipation from top of the page to bottom is strong. The first two images have been cropped to be more-or-less twenty arcminutes on a side. The November 12 image is about thirty arcminutes on a side.
Back in 1996 and 1997 we were treated to the appearance of two spectacular comets in consecutive years, Hyakutake in 96 and Hale-Bopp in 97. It is rare to have two such bright comets so close together. The image below is of Hale-Bopp. It was taken on April 9, 1997. It is a 30-second exposure taken with a camera piggy-backed on a telescope. The blue tail is the gas tail and the white tail is the dust tail. Both tails were fairly bright. By contrast, Hyakutake was almost all gas tail. Comet Holmes above had almost no tail (only coma) because it was still pretty far from the sun when the outburst occurred. The view of Hale-Bopp below is looking out over the Pacific from Pt. Reyes National Seashore. Thanks to Angela Da Silva for this image.