caves formed at the same time as the surrounding rock are called primary caves.
Lava tubes are formed through volcanic activity and are the most common primary caves. As lava flows downhill, its surface cools and solidifies. Hot liquid lava continues to flow under that crust, and if most of it flows out, a hollow tube remains.
Lava caves include but are not limited to lava tubes. Other caves formed through volcanic activity include rift caves, lava mold caves, open vertical volcanic conduits, and inflationary caves.