Magma, like many other things, liquifies at high heat and it cools down and solidifies at low temperatures. Basically, while inside a volcano, magma is liquid and extremely hot and flows freely. When it bursts out, it becomes lava and starts cooling down due to the air and winds and things like that, so it starts turning into rocks and in time these rocks create new layers of the volcano. This is how many islands were formed.
As temperature increases the viscosity of magma decreases,so the magma flows more easily.
Temperature significantly influences magma's state, viscosity, and composition. Higher temperatures yield liquid magma with lower viscosity, while cooler temperatures lead to thicker magma. These variations affect volcanic eruptions and the types of rocks formed during cooling.
;