Molten rock beneath the surface of the Earth is called magma.
Magma forms when rocks in the mantle or crust partially melt. Melting can result from increased temperature, reduced pressure, or the addition of water and other substances that lower a rock’s melting point. It is usually a mixture of liquid rock, crystals, and dissolved gases rather than a perfectly uniform underground lake.
Because magma is often less dense than the surrounding solid rock, it can rise through cracks and weak zones in Earth’s crust. Some magma cools underground and forms igneous rocks such as granite and gabbro. If it reaches the surface through a volcanic eruption, it is called lava instead. That underground-versus-surface distinction is the most common mix-up in this question.
Magma is produced in several tectonic settings, including subduction zones, mid-ocean ridges, continental rifts, and volcanic hotspots. Its composition and gas content help determine whether an eruption is relatively gentle or highly explosive.