The boundary is where the melt meets open air

Deep underground, molten or partly molten rock sits under pressure, often holding dissolved gases such as water vapor and carbon dioxide. Geologists call it magma while it remains below Earth’s surface. When an opening in the crust lets it emerge, the same material is called lava. The name follows its location, not a sudden chemical transformation.

Coming out changes what the rock does

As magma rises, pressure drops. Gas that was dissolved in the melt can expand and escape, helping drive an eruption; if gas is released less violently, the magma may instead flow out. Once exposed, the hot rock also begins losing heat to the air, ground, or water. It gradually cools and hardens into volcanic rock.

Those changes matter to the eruption and its aftermath, even though they do not create the naming distinction. A geologist describing molten rock beneath a volcano is talking about magma; describing a stream crossing the landscape means lava. The boundary is a change of setting—and the start of a different journey for the melt.