A common nickname for comets is "dirty snowball." They are a mixture of ice, gas and dust that didn't absorb into planets or asteroids when the solar system was formed. Comets have extremely elliptical orbits that bring them close to the sun and swing them deeply into space, often beyond the farthest planets in the solar system.
The nucleus of a comet is also known as the core. It contains mostly ice and dust covered with a dark organic material. Typically, the nucleus contains frozen water, but other frozen substances may exist such as carbon dioxide, ammonia, carbon monoxide and methane. Most comet nuclei are less than 16 km in diameter. As a comet nears the sun, the nucleus heats up and gases escape from it.
The spherical envelope of gas that surrounds a comet's nucleus is called a coma. When combined with the nucleus, it forms the comet's head. The coma is roughly a million kilometers across, and is comprised of dust and gases that have sublimed from the comet's nucleus. Sublimation occurs when a material changes from a frozen state to a gas state, and skips the intermediate liquid phase.
According to Solarviews.com, "As the comet absorbs ultraviolet light, chemical processes release hydrogen, which escapes the comet's gravity, and forms a hydrogen envelope. This envelope cannot be seen from Earth because its light is absorbed by our atmosphere, but it has been detected by spacecraft." The hydrogen cloud is a huge envelope, millions of kilometers in diameter.
A dust tail is formed by radiation from the sun that forces dust particles away from the coma. Because dust tails are shaped by the solar wind, they point away from the sun. The tail curves slightly as a result of the comet's motion. This acceleration is relatively slow. As the distance from the sun increases, the dust tail fades and diminishes. The dust tail measures up to 10 million kilometers in length.
Charged solar particles convert some cometary gases into ions, forming an ion tail. The ion tail is less massive than the dust tail, and accelerates much faster so that the tail is nearly a straight line extending away from the comet, in a direction opposite from the sun. The ion tail can measure over 100 million kilometers long.