Flight levels and Altitude understanding
To see why flight levels are used, a discussion of the means of measuring altitude is necessary.
Historically, altitude has most easily been measured using an altimeter, which is essentially a calibrated barometer - it measures air pressure, which decreases with increasing altitude. To display altitude above sea level the pilot must recalibrate the altimeter according to the local air pressure from time to time, to take into account natural variation of pressure over time and in different regions. If this isn't done, different aircraft may be flying at different heights even though their altimeters show the same altitude. More critically, different aircraft may be flying at the same height even though their altimeters show different heights. Clearly this is a safety issue.
Flight levels solve this problem by defining altitudes based on a standard pressure of 1013.2 mb (29.92 inHg used in U.S. and Canada). All aircraft operating on flight levels calibrate to this same standard setting regardless of the actual sea level pressure. Flight levels are then assigned a number which is the apparent altitude ("pressure altitude") to the nearest thousand feet, divided by one hundred. Therefore an apparent altitude of 12,000 feet is referred to as Flight Level 120 (except in the United States and Canada -- see note below). Note that aircraft may be at some other actual height than 12,000 feet, but since they all agree on a standard pressure, no collision risk arises.
Flight levels are not used close to the ground, for perhaps obvious reasons - obstacles are fixed to the ground and so their absolute height needs to be known. A vertical region extending from a defined transition altitude to the lowest available flight level is known as the transition layer - pilots will use altitude based on the local pressure below this level, and flight levels above. The altitude of the lowest flight level varies from country.
An estimate of the real altitude is based on air pressure at the aircraft and the reported local air pressure at sea level (if there is no sea, this is a virtual value by adjusting the value at the ground for its elevation). However, to avoid collisions between two planes, their real altitudes are not important, but only the difference between them. This difference solely depends on the air pressure at both planes, and does not require knowledge of the local air pressure on the ground.
Therefore air traffic control assigns a plane a "flight level" (a nominal altitude), based on an altitude scale with a one-to-one correspondence with air pressure at the plane. Thus basically the plane is assigned an air pressure. The flight level corresponds to the real altitude that would be concluded from the air pressure, if the air pressure at sea level were 1013.2 mbar (29.92 inHg or 101.32 kPa).