A rock that forms when magma hardens beneath Earth's surface called an extrusive igneous rock. These types of rocks are formed when magma (which forms lava under the Earth's surface) eventually gets to the surface of the Earth and begins to cool rapidly.
Magma usually gets to the Earth's surface through a volcano eruption and can often be found at the base of or nearby a volcano. These extrusive igneous rocks will have small crystals on them made up of different chemicals such as rhyolite, obsidian, andesite, and basalt.
If you are ever near a volcano and see anything that resembles magma or extrusive igneous rock, do not get close to it. Often times these will still be hot to the touch and should never be messed with.