When magma cools and hardens, it forms what scientists call igneous rock. The time it takes for hot magma to turn into igneous rock varies and depends upon its composition and location. Continue Reading. Magma that cools and hardens above ground creates extrusive igneous rock, whereas magma that cools underground forms intrusive igneous rock.