Volcanic eruptions release significant volumes of gases and particulates into the atmosphere, which has the primary impact of reducing the solar radiation reaching the earth's surface, causing short-term cooling whilst this material remains suspended in the atmosphere. For example, the sulphur dioxide released as part of eruptions forms sulphuric acid, which condenses to form aerosols that increase the solar radiation reflected from the atmosphere. Ash particulates form condensation nucleii around which water droplets form, increasing the reflectivity of the atmosphere and the solar radiation that is lost back to space.
The eruption of Mount Pinatubo in 1991 released a 20 million ton cloud of gases into the atmosphere up to a height of 20 miles. The average earth's temperate cooled by up to 1.3 degrees in the three years that followed the eruption.
Volcanoes can also release greenhouse gases such as carbon dioxide, that contributes to warming (see link for more information) albeit the total volume of carbon dioxide released from volcanoes is tiny when compared with anthropogenic (man-made) emissions of greenhouse gases. For example, the Mount St Helens eruption in 1980 resulted in 10 million tonnes of carbon dioxide being released, which is equivalent to c. 2.5 hours of human activity at current levels.