As the air in the tanks is used for stopping, leveling, honking horns, etc., the pressure goes down. When it reaches about 90 psi the regulator signals the compressor to start working again and the whole cycle starts again. The two or more air tanks provide the safety backup for situations where an air leak happens in part of the system. Each tank is isolated from the other tanks with check valves that prevents air flowing to the leaking part of the system from the parts of the system that are ok. The compressor provides air to all tanks through a manifold that biases the air to the most important tank, the one that provides air to the service brakes and emergency brakes.
Some system designs have one tank for half of the brakes and another for the other half.
Auxiliary uses like leveling using air bags are applied to the second most important tank. In emergency conditions, like a total break of an air line, one tank is always isolated so that there is air for use in braking. The most important use of air on heavy vehicles is for the service and emergency brakes. The brake pedal is a valve that modulates air to the brakes proportionally to its position. When the pedal valve is pressed slightly, a few psi of pressure is applied to the drum or disk brakes on both sides of each axle.