Mean Sea Level (MSL) is the datum for measurement of elevation and altitude.
Mean Sea Level is the equipotential surface of the Earth as described by the WGS84geoid
Equipotential Surface
The gravity field of the earth is neither perfect nor uniform because density (and therefore mass) varies throughout the planet. This is due to magma distributions, mountain ranges, deep sea trenches, etc. If the Earth was a perfect sphere covered in water, the water would not be the same height everywhere. Instead, the water level would be higher or lower depending on the particular strength of gravity in that location.
The surface of the oceans that would exist if the oceans were in equilibrium - that is at rest, unaffected by wind, currents and moon and interconnected by canals across continental land masses - would be an equipotential surface.