At rest, with no air, the brakes are released. There is no big spring that constantly keeps them on.
When the air is charged, it charges the train line - the pipe and hose going from car to car - and through the brake valve it also charges the reservoir. To be technical there are two separate reservoirs, the service portion and the emergency part but since the halves are bolted together they appear to be one big "tank".
When the system is fully charged, and the brake pipe and reservoir pressures are equal, the brakes are released. Any reduction in the train line - either by the engineer letting air out through the brake valve, or by the train parting - causes air to be sent from the reservoir to the brake cylinder. In the brake cylinder it pushes against a piston which moves levers and applies the shoes to the wheels.
There are a lot of additional factors and details but that's a basic primer.