Mass Air Flow Sensor (MAF) Fault Symptoms & Problems
The Mass Air Flow Sensor (MAF) measures the levels of air entering the engine through the intake system. The readings from the sensor are passed to the ECU (Engine Control Unit aka the car's brain!). The ECU will use this information so that it can calibrate the amount of fuel that it needs to inject via the fuel injectors.
The fuel/air levels are constantly tweaked by the ECU based on the input from the MAF sensor. If for some reason the MAF sensor is not sending the correct readings then the engine will behave erratically as it will be operating with an incorrect fuel / air mix.
MAF sensors are prone to error when they get dirty. As a car ages there can be a build up on the sensor which can degrade its performance and affect the data it sends to the ECU. The sensor can be cleaned (quite often as a DIY job) to improve accuracy but sometimes they also fail and need replacing.