As the magma cools in the water it forms igneous rock.
Explanation:
Igneous rocks are generally formed by cooling the magma with water. Magma is the molten or semi-molten natural material formed from the mantle rocks. Magma is commonly found under the surface of the Earth.
Extrusive igneous rocks are volcanic rocks that are formed by cooling lava in the earth’s surface. A volcano is a conical mountain or hill having a vent or crater. The lava, gas, hot vapor and rock fragments generated from the earth's crust are passed through the vent. Composite volcano, shield volcano, cinder cone volcano, and lava dome volcano are some of the types of volcanoes.