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. As the pedal is pressed further, more pressure is applied to the brakes.
ABS is a subject of another article.
If no ABS system is present, then full pedal movement provides enough pressure to lock up all the wheels, that's why you see the double black marks on the highway where large vehicles have had to stop quickly. As the pedal is released, the air pressure is released to the atmosphere making the characteristic sound. The compressor then has to make up the air pressure used by this braking process. It is advisable to keep a steady slight pressure on the air brakes to keep the vehicle at a safe speed. It is better to be in the proper lower gear, going slower and using an exhaust brake so the use of the service brakes can be saved for real emergency braking actions.