Background
Comets are essentially “dirty snowballs”, meaning they are made of ice and dirt. Many of the discovered comets originated in the Oort cloud. In the outer Solar System, comets do not have tails or comas but are compact objects that are difficult to observe.
As a comet travels through the Solar System and becomes closer to the Sun, sunlight will start to heat the surface of the comet, leading to the formation of both the tail and the coma. During this time, it is easier to observe comets, as they will become bright due to the dirt being released from the surface and the ice reflecting sunlight.