This kind of rock is called IGNEOUS ROCK.
There are three basic types of rocks, these are igneous, sedimentary and metamorphic rocks. Igneous rocks are rocks that are formed from the cooling and hardening of the lava that reaches the earth surface. Igneous rocks typically formed around explosive volcanic eruptions.