Phil Plait of Bad Astronomy can help you understand this miracle of the cosmos. His post on 10 Things You Didn't Know About Comets does include some things I already knew—the whole "comets are basically dirty snowballs" bit—but there's plenty of wonderful new-to-me-anyway knowledge to make up for it.
For instance, that circled dot in the image up there? That's Halley's Comet, as photographed in 1982, while it was out on the far side of Saturn. Notice how there's just a dot, and no big, long tail? That's not a misleading trick of space photography. When they're far enough away from the sun, comets lose their snowball slushiness and freeze down into tiny, solid balls.
Comets tend to have long, elliptical orbits. The farther they are from the Sun, the slower they travel, so really they might spend 99.9% of their lives far, far from the heat of our nearest star. That in turn means that all that volatile stuff in the nucleus is frozen, and actually it gets so cold that even the water freezes into ice harder than rocks on Earth.
Bad Astronomy: 10 Things You Don't Know About Comets
For more about this Halley pic, visit the Smithsonian Air and Space Museum.