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 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")