The scientific name for a lava rock is "igneous rock," which is formed through the cooling and solidification of magma or lava. As explained by Geology.com, igneous rocks are classified as either extrusive or intrusive.
When lava flow ejects from volcanic vents, it quickly cools to form small crystals and fine-grained textures, which are characteristic of extrusive rocks. Obsidian and basalt are examples of extrusive igneous rock. Carl Rod Nave of Georgia State University explains that the cooling of magma below the Earth's surface is usually much slower, so larger crystals are able to form. These large interlocking crystals are characteristic of intrusive igneous rock, such as granite.