Volcanic rock (often shortened to volcanics in scientific contexts) is a rock formed from lava erupted from a volcano. In other words, it differs from other igneous rock by being of volcanic origin. Like all rock types, the concept of volcanic rock is artificial, and in nature volcanic rocks grade into hypabyssal and metamorphic rocks and constitute an important element of some sediments and sedimentary rocks. For these reasons, in geology, volcanics and shallow hypabyssal rocks are not always treated as distinct. In the context of Precambrian shield geology, the term "volcanic" is often applied to what are strictly metavolcanic rocks. Volcanic rocks and sediment that form from magma erupted into the air are called "volcaniclastics," and these are technically sedimentary rocks.
Volcanic rocks are among the most common rock types on Earth's surface, particularly in the oceans. On land, they are very common at plate boundaries and in flood basalt provinces. It has been estimated that volcanic rocks cover about 8% of the Earth's current land surface.