Magma was molten rock, often found in the interior of worlds.
While serving aboard the USS Billings in 2365, Commander Kathryn Janeway sent an away mission to survey a volcanic moon. The shuttlecraft was damaged by a magma eruption, and three of the Billings crewmembers were severely injured. (VOY: "Night")
In 2369, the Bajorans began a project to tap the molten core of Jeraddo for energy. From Deep Space 9, Jadzia Dax was able to monitor the moon's magma pressures. (DS9: "Progress")
In 2370, life on the planet Atrea IV was threatened by the solidification of its molten core. The USS Enterprise-D was able to reverse the process by injecting plasma into pockets within the planet's magma layer. (TNG: "Inheritance")