Igneous rocks are formed from solidification and cooling of magma. The magma can be obtanied from partial melts of pre-existing rocks in either the planet's mantle or crust. Plutonic or intrusive rocks area result of when the magma cools and crystallizes slowly within the Earth's crust. A example is granite.