Odds are you already know that comets are kind of like giant dirty snowballs. Indeed, they’re made of ice chunks, frozen gasses and embedded organic material. This frozen stuff is known as the comet’s nucleus.
Now, when a comet approaches the sun, some of this turns into gasses, and the comet develops an atmosphere known as a coma. The coma actually grows as the comet gets closer to the sun.
While a comet’s nucleus is relatively small — maybe a few miles in diameter — a comet’s coma can extend for hundreds of thousands of miles. Not only that, but the coma is bombarded by sunlight and high speed solar particles, or solar wind, which blow all that gas and dust away from the sun. This is why comets have tails!
In fact, comets have two tails: a gas tail and a dust tail that point in slightly different directions.