The outside of the airplane has a forward-pointing tube called a pitot tube. As the airplane travels forward, air is compressed into this tube. By measuring the pressure, you can derive the airspeed. However the higher you go, the lower the ambient air pressure is and so the "indicated airspeed" is not at all accurate.
However indicated airspeed is still very useful as it measures the air resistance the aircraft is encountering which determines lift and airframe stresses (which is why the airframe speed limit is in indicated airspeed and not actual airspeed).