Comets are small masses of ice and rock particles, similar to planets, but much smaller, which travel through space in an orbit and typically have long, bright tails.
As a comet moves close to a star, such as our sun, the star's heat turns the outer ice into steam, and particles of rock are released as dust.
This mixture of dust and steam forms the comet's tail, which, because of the absence of gravity, can extend thousands of miles into space.
Here on Earth, we see comets only if they happen to pass between us and the sun. It is reflected sunlight which illuminates comets and their tails.