human
How is a volcano formed?
assistant
A volcano is formed when molten rock, called magma, rises from the Earth's mantle and reaches the surface. When the magma comes into contact with air, it undergoes a chemical reaction that produces gases, such as carbon dioxide and sulfur dioxide. These gases expand rapidly, creating a high-pressure environment that causes the magma to erupt violently through the Earth’s crust. The eruption creates a volcanic cone, which can range in size from small hills to mountains. As the magma cools and solidifies, it forms a volcanic deposit, which is composed of rocks and minerals that are different from those found on the surface.