Magma can escape to the Earth's surface in the form of lava as a result of a volcanic eruption or through a fracture in the Earth's crust, both on land and underwater.
Lava is similar in composition to magma, but is depleted of volatile components. It consists mainly of molten oxides of silicon, iron, sodium, potassium, calcium, and other metals.