A comet is a small celestial body that orbits the Sun, composed primarily of ice, dust, and rocky materials. When a comet comes close to the Sun, it heats up and releases gases and dust, forming a visible atmosphere or coma, and sometimes a tail that always points away from the Sun.