All of these phenomena are related and yet in some ways quite distinct. Most significant historical episode was Newton's mathematics and Halley's prediction of the return of the Great Comet in 1757. Halley's comet has been followed down through the ages and made a foreboding appearance during the Battle of Hastings and appears in the Bayeaux Tapestry. Every passage of this comet since 240 BC has been noted. Improvements in mathematical techniques during the early 19th century made the prediction of orbits more reliable and many comets were observed and catalogued.
Comets consist of primarily volatile molecules making up various ices.
As they approach the sun they begin to heat and the ices vaporize. Water ice evaporates and the H2O liberated is quicky broken down to hydrogen and oxygen gas. The pale white light that we see is the result of flourescence . Comets can exhibit highly variable behaviour as the nucleus heats up. Gases can vent from the comet and perturb its orbit as well as dramatically change its appearance.