Not every comet is the same, but it wouldn't be terrible to say that a comet is a dirty-icy object in the solar system. When they come near the sun, they melt (I'm not sure "melt" is the most appropriate term here) and produce gas and dust. The gas and dust form both a coma and a tail (or two tails). If the comet is large enough and close enough to Earth, you can see the comet from the sunlight that reflects off this gas and dust.