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. In addition to this light is also reflected from the dusty part of the comet. In fact, as the tail of the comet grows it will often split into two distinct parts. The ion tail points straight back or forward always opposite the sun. It glows through flourescence and is quite variable from night to night.