Lava is more frequent on volcanic planets, can also be found on temperate planets and cannot be found at all on glacial planets, asteroids or planets.
To empty a lava pocket, drill around it. The vibrations from your drill cause the lava to fall more frequently, slowly depleting the lava pocket.
Caution: Lava burns, dealing damage and raising your temperature.
Small Lava Globule
Found dripping from lava pockets, this globule of molten rock is great for refining resources and is used in the making of many modules and sub-systems.
Medium Lava Blob
Falling from the deep lava pockets, this blob of molten slag is much bigger and hotter than a globule. Can also be obtained by digging into an emptied lava pocket.
Big Lava Glob
Dripping off the deepest lava pockets, this glob of molten metal is searing hot. Can also be obtained by digging into an emptied lava pocket.
Obtained from lava pockets that have been emptied by drill vibrations, obsidian isn't exactly rare, but it's not easy to get either. It has a wide range of applications, from crafting components to upgrading sub-systems.