as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
explain how volcanoes are formed.
user
volcanoes are formed when molten rock called magma collects within the earth's crust and then rises towards the surface. as the magma rises through the layers of the earth, it encounters pressure change and chemical reactions with surrounding rocks, which causes chemical reactions and the magma to become molten lava. lava then erupts through the earth's surface causing a volcanic eruption.
assistant