what specific rocks are formed by cooling magma
There are two known processes by which magma ceases to exist: by volcanic eruption, or by crystallization within the crust or mantle to form a pluton. In both cases the bulk of the magma eventually cools and forms igneous rocks.