The main attraction of comets is their shiny long tail. Most of a comet will be frozen ice. This frozen part, about a kilometer in size, is called the nucleus. The nucleus contains ice, dust, and frozen gases. As the comet approaches the Sun, the heat causes the ice to evaporate directly. At the same time, dust particles form an atmosphere around the nucleus of the comet. This is known as coma. The closer you get to the sun, the larger your coma will be. They can reach tens of thousands of kilometers in size.
Due to the pressure of sunlight and rapid solar particles (solar wind), the dust and gases in the coma are thrown in the opposite direction to the sun. This is how the comet’s bright tail is formed. A comet actually has two tails, one is a dusty comet and the other is a gaseous iron tail. Even the word comet, the English word for comets, is derived from the Greek word comet, meaning long-haired.
However, astronomers can determine whether a newly discovered solar system object is a comet or an asteroid by examining the presence of a bright comet. The link below is a short article about comets, their formation, and where they come from. You can also listen through the podcast.