All discovered exocometary systems (Beta Pictoris, HR10, 51 Ophiuchi, HR 2174, 49 Ceti, Vulpeculae 5, 2 Andromedae, HD 21620, HD 42111, HD 110411, and more recently HD172555) are around very young A-type stars.
The exocomets are detected using spectroscopy when they transit their host stars. The transits of exocomets, like the transits of exoplanets, produce variations in the light received from the star. Changes are observed in the absorption lines of the stellar spectrum: the occultation of the star by the gas cloud coming from the exocomet produces additional absorption features, like those observed in the ionized calcium lines. The cometary gas comes from the evaporation of volatiles and dust ejected from the comet's nucleus heated when it comes close to the star.
Observations of comets, and especially exocomets, provide important elements for understanding planet formation. Indeed, in the standard model of planet formation by accretion, planets are the result of the agglomeration of planetesimals, themselves formed by the coalescence of dust from the protoplanetary disk surrounding the star shortly after its formation. Thus, comets are the residuals of the volatile-rich planetesimals that remained in the planetary system without having been incorporated into the planets. They are considered fossil bodies that have seen the physical and chemical conditions prevailing at the time of planet formation.