The air flow meter is of the mass sensing type. There is a thermisistor in the air path which keeps tabs on the temperature of the intake air. To measure the actual mass, there is a small very fine wire strung in a square shape standing on a corner. A current is passed through this wire, heating it. The inrushing air cools the wire - the more air that passes over the wire the cooler the wire becomes. The resistance of the wire of course changes with temperature, the computer keeps tabs on the current dram of the wire.
The most common syptom of failure is that the engine will idle perfectly, but will not rev over approximately 2000 rpm.
The wire gets stuff on it while operating, which impedes heat transfer so the wire cleans itsself each time the engine is shut down. The computer puts enough current through the wire to heat it until it's white hot, which presumably burns off any stuff from the wire. On turbos the wire is only cleaned if the car is under 239F, has been above 1500rpm, and has been driven at more than 12mph. Non-turbos are cleaned when the engine is shut off and it's under 239F and has been run at more than 1500rpm, regardless of being driven or not.
To test your air flow meter, Drive your car around the block. Remove the air filter and the tube leading to the air flow meter WITHOUT shutting the engine off. Be carefull to not let anything get sucked into the engine. Have an assistant turn off the engine while you're looking down into the air flow meter. If the wire doesn't glow, your air flow meter is bad. Rebuilts air flow meters are avilable for about $200.