(covers information from several alternate timelines)
A comet is a celestial body, usually orbiting a star, composed of rock and ice. If a comet approaches close enough to a star, the increased heat causes it shed mass away from the star, creating a coma and/or "tail".
In June 2151, the Earth starship Enterprise NX-01 discovered the largest comet yet observed by Humans, with a diameter of 82.6 kilometers. It was named Archer's Comet for Enterprise's captain, Jonathan Archer. (ENT: "Breaking the Ice")
In the 22nd century, many comets in the Sol system were diverted to Mars by the verteron array for the Martian terraforming project. At one point, fourteen comets were scheduled to impact with Mars in a thirty-month span, starting with the arrival of comet Burke in January of 2155. (ENT: "Terra Prime")
The USS Enterprise-D tracked a rogue comet through Sector 1156 in 2370. Its core, composed largely of fortanium, proved to be a D'Arsay cultural archive, built over 87 million years previous. (TNG: "Masks")
Commander Benjamin Sisko compared his name with a comet who will blaze across the stars long after Kira's petty treacheries will be forgotten while under the influence of the Saltah'na energy spheres. (DS9: "Dramatis Personae")
In 2371, the wormhole relay station experiment conducted by the USS Defiant in the Gamma Quadrant diverted a comet laden with silithium towards the Bajoran wormhole. Some interpreted this comet as the "Sword of Stars", an element in Trakor's Third Prophecy. (DS9: "Destiny")
When Chakotay tried to erase a comet, which forced the Voyager to enter Krenim territory several months ago, he altered the timeline by wiping out almost 8,000 civilizations as life within fifty-thousand kilometers around the comet would have never existed. Four billion years ago, hydrocarbon fragments of this comet erased to plant life on a planet. (VOY: "Year of Hell, Part II")