Altimeters measure static air pressure, which decreases with altitude.
The pressure-sensitive measuring element is a diaphragm capsule (aneroid capsule) which reacts to the effect of changing air pressure as the aircraft changes altitude. Tempered, aged copper-beryllium diaphragms ensure highly accurate readings. Diaphragm movement is transmitted to the instrument pointers by a linkage and gearwheels - the whole is insensitive to shock and vibration. A bimetal link compensates the effect of temperature change.