The specific type of rock that forms when magma cools at the Earth's surface is extrusive igneous rock. Igneous rock forms when magma cools, but where the magma cools determines the type of igneous rock that forms. Igneous rock gets its name from the Greek word for fire and is so called due to the extremely hot liquid from which the rocks originate.