The mass air flow sensor is used on fuel injected vehicles to monitor the amount of air that is bein mixed in with the fuel. In automobiles, air density can vary quickly due to temperature, altitude, or the use of a turbocharger.
While there are many types of sensors, electronic fuel injected engines typically use one of two types of mass air flow sensors.
a) Vane meter
b) Hot wire
These sensors are designed to be precise, and any small electrical or mechanical failure can cause the engine to operate at less than optimum performance levels, increasing fuel consumption and increasing wear on the engine.
For more information, Wikipedia has a great article here.