A comet is a celestial body found in large numbers in most solar systems. They are primarily made of frozen water, though many other elements and compounds are often present. Comets are believed to be amongst the oldest bodies associated with a given solar system, and thus analysis of them can provide valuable insights into conditions during the formation of the system.
By the mid 22nd century the Vulcans had researched hundreds of comets, and considered further investigation of them to be a waste of effort. When the NX-01 discovered a new and exceptionally large comet in 2151, a Vulcan ship observed their exploration of it, apparently not understanding the crew's motivations. In fact the comet proved to contain large quantities of Eisilium, a substance that Vulcan chemists had never been able to produce in any significant quantities and which the Vulcans had thus never been able to study. This marked one of the first occasions on which Earth science advanced beyond Vulcan science in any respect.1
When comets are heated by a sun the ice melts, causing a tail of dust and gas to vent into space. This is blown away from the sun by light pressure, forming a long tail. The many particles of the tail can obscure sensor function, allowing a ship to hide behind the tail of a comet effectively. On the other hand, passing through the tail of a comet can cause a visible disturbance in those particles, rendering even a cloaked vessel visible. These factors were important in the battle between the USS Enterprise and a Romulan Warbird in 2266.2
Rogue comets which were not associated with any one star system were also known. In 2370 the Enterprise-D investigated such a comet and found the large D'Arsay Archive hidden within it.3
In 2372, the USS Voyager found a comet in the Delta Quadrant in which a member of the Q Continuum had been imprisoned by his fellow Q. Voyager released the Q.4