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)
Throughout the seven seasons of "Star Trek: Deep Space Nine", a comet flies past at the start of the opening credits.