A comet is an icy object that orbits the Sun. It contains frozen gases, dust, rock, and other material from the early solar system.
Why comets have tails
When a comet gets close to the Sun, heat causes ice to turn into gas. Dust and gas form a glowing cloud called a coma, and solar radiation can push material into a tail.
Comet versus asteroid
An asteroid is usually rockier or more metallic. A comet is often described as icy and dusty, especially when it becomes active near the Sun.
Comets can leave debris trails that later produce meteor showers.