Altitudes and elevations are always measured relative to a defined level. The technical term for this is "
datum". The most commonly used datum is
WGS 84, which refers to the World Geodetic System.
GPS uses this datum. It corresponds to what laypeople think of as "mean sea level"
(MSL), though hydrographers don't.
Airliners can also measure their altitude via a radar altimeter. It directly measures the distance to the ground, which results in the "altitude above ground level"
(AGL).
Typically, an aircraft altimeter is barometric. It measures the (static) air pressure around the aircraft and relates it to the air pressure on the ground (which is another datum). Obviously, the weather influences this measurement, which is why every major airport employs a metereologist, issues weather reports almost hourly, and requires pilots to listen to them.
Pilots must adjust their altimeter to the proper pressure datum to have the correct altitude. Finding on landing that the runway is further down than you thought, or worse, that the ground is higher up, can really ruin a pilot's day.
Aircraft pressure altimeters indicate the elevation of the aircraft above a defined datum. The datum selected depends on the barometric pressure set on the
altimeter sub-scale. Sound
altimeter setting procedures are an essential tool in ensuring safe separation from the ground and from other aircraft.
QNH - The pressure set on the subscale of the altimeter so that the instrument indicates its height above sea level. The altimeter will read runway elevation when the aircraft is on the runway.
Airfield QNH is obtained by correcting a measured QFE to sea level using ISA regardless of the temperature structure of the atmosphere. As your altimeter is calibrated using ISA, it will indicate altitude correctly at the airfield reference point. At other altitudes, the indicated altitude is likely to be in error, depending on the temperature of the atmosphere.
For fast-moving jets, adjusting the altimeter to local weather conditions is impractical. It's more important that everyone has the same idea of what their altitude is, so they all use the same datum, even though that may mean their actual altitude is off.
Altitude
The vertical distance of an object measured from mean sea level.
Flight Level (FL)
A surface of constant atmosphere pressure which is related to a specific pressure datum, 1013.2hPa, and is separated from other such surfaces by specific pressure intervals.
Altitude above sea-level in 100 feet units measured according to a standard atmosphere. Strictly speaking a flight level is an indication of pressure, not of altitude. Only above the
transition level (which depends on the local
QNH but is typically 4000 feet above sea level) are flight levels used to indicate altitude; below the transition level feet are used.
e.g. FL250 = 25,000 feet above mean sea level when the pressure at sea level is 1013.2 mb.
Regarding the FR24 issue:
I think what is happening at the receiver is when each ADS-B data packet (which contains a lot of data) includes an "aircraft on ground" bit the altitude is sent as being zero.