There are really only two reasons why an air compressor will not shut off.
The first is that the pressure switch has malfunctioned. It is supposed to trip off when the tank pressure reaches the set point, cut power to the motor, and that stops pumping air into the tank. If the pressure switch does not trip off when the pressure in the compressor tank reaches the correct set point, then the pressure switch has failed, and needs to be replaced.
Or, if the air pressure in the tank does not ever get to the pressure switch out pressure level, then your air compressor will never shut off. There are many reasons why an air compressor will run, and run, and run and never reach the cut out pressure setting.
Both issues are addressed in detail on the website. Visit the site, click the site map link, and look under Troubleshooting for lots of information about why your air compressor will not shut off, why it will not start, etc. etc.