And it is similarly just a naming convention with the meteor* things:
Regardless of its composition, when it breaks off from an asteroid or comet, as long as it is in space it is a meteoroid. When it hits the ...
For magma and lava it's liked you said: "magma" is used under the surface, "lava" above. See for instance the definition of USGS Volcano Hazard Program's glossary:
Lava: General term for magma (molten rock) that has been erupted onto the surface of the Earth and maintains its integrity as a fluid or viscous mass, rather than exploding into fragments.