For the shuttlecraft, see Comet (USS Robinson).
Icarus IV

The Icarus IV comet in 2266

A comet is a type of celestial body that is composed of rock and ice, and is usually found to be orbiting a star. If a comet orbits too close to a star, then the increased heat causes the comet's more volatile components to sublimate, shedding its mass, and creating a coma and/or "tail".

Sometime after the events put in motion by Quinn in the 20th century (for his friend Maury Ginsberg, D.D.S.), the controversial Q is banished inside one; until the 24th century. (VOY episode: "Death Wish")

In June 2151, the Earth starship Enterprise discovered the largest comet that had yet been discovered by Humans, and was named Archer's Comet after Enterprise captain, Jonathan Archer. (ENT episode: "Breaking the Ice"; TNG novel: A Time to Sow; ST reference: Star Charts)

In late 2266, the area near the Icarus IV comet was the focus of a battle between the ChR Gal Gath'thong and the USS Enterprise. (TOS episode: "Balance of Terror"; TOS novel: The Return; CCG)

In 2267, Sanduy's Comet made its historic closest approach to the planet Nukolee. It triggered meteorite showers that expelled unidentified gases into the atmosphere, triggering random occurrences of madness among the population. (TOS comic: "A World Gone Mad")

In 2373, the USS Enterprise-E detected a class-2 comet while conducting a patrol of the Romulan Neutral Zone. (TNG movie: First Contact)

Throughout the seven seasons of "Star Trek: Deep Space Nine", a comet flies past at the start of the opening credits.