The altimeter displays the altitude of the airplane above mean sea level (MSL) when properly adjusted to the current pressure setting. The value is expressed in feet (ft); it can be meters (m) in some aircraft.
In aircraft, an aneroid barometer measures the atmospheric pressure from a static port outside the aircraft.
Air pressure decreases with an increase of altitude---approximately 100 hectopascals per 800 meters or one inch of mercury per 1000 feet near sea level.
The analogic altimeter has 2 needles:
The direct value of the altimeter can be displayed directly in some instruments with only the long needle for hundreds of feet.
Note that the altimeter shall be calibrated with the pressure value in hPa or inHg using the rotating knob on the bottom left or bottom right of the instrument.
The pressure chosen can be local airfield pressure QNH or standard QNH 1013 hPa / 29,92 inHg dependent on your altitude and country regulation.