Volcanoes are formed when magma from within the Earth's upper mantle works its way to the surface. At the surface, it erupts to form lava flows and ash deposits. Over time as the volcano continues to erupt, it will get bigger and bigger.
Volcanoes erupt because of density and pressure. The lower density of the magma relative to the surrounding rocks causes it to rise (like air bubbles in syrup). It will rise to the surface or to a depth that is determined by the density of the magma and the weight of the rocks above it
Here is how volcanos work
Volcanoes are just a natural way that the Earth and other planets have of cooling off and releasing internal heat and pressure.
As the magma rises, bubbles start to form from the gas dissolved in the magma. The gas bubbles exert tremendous pressure. This pressure helps to bring the magma to the surface and forces it in the air, sometimes to great heights.
It's sort of like the bubbles of gas in a bottle of soda. Before you open the soda you don't see many bubbles because the pressure in the bottle keeps the gas dissolved in the soda. When you open the bottle the pressure is released and the gas bubbles leave the soda. If you shake up the bottle first, the soda gets pushed out by the bubbles of gas as they rush out.
Here is how volcanoes are affecting the planet:
There are two things to think about. The first is how the weather near an erupting volcano is being affected. The second is how large eruptions will affect the weather/climate around the world. I think more people are worried about the second issue than the first.
The main effect on weather right near a volcano is that there is often a lot of rain, lightning, and thunder during an eruption. This is because all the ash particles that are thrown up into the atmosphere are good at attracting/collecting water droplets. We don’t quite know exactly how the lightning is caused but it probably involves the particles moving through the air and separating positively and negatively charged particles.
Another problem in Hawai’i involves the formation of vog, or volcanic fog. The ongoing eruption there is very quiet, with lava flowing through lava tubes and then into the ocean. Up at the vent is an almost constant plume of volcanic fume that contains a lot of sulfur dioxide. This SO2 combines with water in the atmosphere to form sulfuric acid droplets that get carried in the trade winds around to the leeward side of the Big Island. The air quality there has been really poor since the eruption started in 1983 and they are getting pretty tired of it.
As for the world-wide affects of volcanic eruptions this only happens when there are large explosive eruptions that throw material into the stratosphere. If it only gets into the troposphere it gets flushed out by rain.
The effects on the climate haven’t been completely figured out. It seems to depend on the size of the particles (again mostly droplets of sulfuric acid). If they are big then they let sunlight in but don’t let heat radiated from the Earth’s surface out, and the net result is a warmer Earth (the famous Greenhouse effect). If the particles are smaller than about 2 microns then they block some of the incoming energy from the Sun and the Earth cools off a little. That seems to have been the effect of the Pinatubo eruption where about a 1/2 degree of cooling was noticed around the world. Of course that doesn’t just mean that things are cooler, but there are all kinds of effects on the wind circulation and where storms occur.
An even more controversial connection involves whether or not volcanic activity on the East Pacific Rise (a mid-ocean spreading center) can cause warmer water at the surface of the East Pacific, and in that way generate an El Nino. Dr. Dan Walker here at the University of Hawai’i has noticed a strong correlation between seismic activity on the East Pacific Rise (which he presumes indicates an eruption) and El Nino cycles over the past ~25 years.
You might try this, but do it outside...