Volcanic Gases and Volatiles
All volcanoes emit gases. The most common gas is water vapour followed by carbon dioxide and sulphur dioxide. The rate of sulphur dioxide emmision is an indicator of volcanic activity levels. Sulphur dioxide high in the atmosphere has a cooling effect on the earth. Carbon dioxide has a warming effect and is a greenhouse gas.
Volcanoes probably supplied the earth with its initial atmosphere, warming the environment enough that life could survive. If magma is fluid then gas can easily escape, such as basalt. If magma is more viscous then gas cannot so easily escape and may be released violently. Volcanoes emit many other gas including the Noble gases,chlorine,methane,CO and hydrogen.