A lava tube is a natural conduit formed by flowing lava which moves beneath the hardened surface of a lava flow. Tubes can be actively draining lava from a volcano during an eruption, or can be extinct, meaning the lava flow has ceased and the rock has cooled and left a long, cave-like channel.
Lava tubes are a type of lava cave formed when an active low-viscosity lava flow develops a continuous and hard crust, which thickens and forms a roof above the still-flowing lava stream. Tubes form in one of two ways: by the crusting over of lava channels, and from pāhoehoe flows where the lava is moving under the surface.
Lava usually leaves the point of eruption in channels. These channels tend to stay very hot as their surroundings cool. This means they slowly develop walls around them as the surrounding lava cools and/or as the channel melts its way deeper. These channels can get deep enough to crust over, forming an insulating tube that keeps the lava molten and serves as a conduit for the flowing lava. These types of lava tubes tend to be closer to the lava eruption point.