Igneous rock, or magmatic rock, in geological terms, is one of the three major types of rock that forms when magma cools (magma ejected from the earth's crust, or melted existing rock). More than 700 types of magmatic rocks have been found, most of them inside the earth's crust. The common magmatic rocks are granite, andesite and basalt. Generally speaking, magmatic rocks tend to occur in volcanic regions of plate boundary zones.