During quiet breathing, the predominant muscle of respiration is the diaphragm. As it contracts, pleural pressure drops, which lowers the alveolar pressure, and draws air in down the pressure gradient from mouth to alveoli. Expiration during quiet breathing is predominantly a passive phenomenon, as the respiratory muscles are relaxed and the elastic lung and chest wall return passively to their resting volume, the functional residual capacity.
However, during exercise, many other muscles become important to respiration. During inspiration, the external intercostals raise the lower ribs up and out, increasing the lateral and anteroposterior dimensions of the thorax. The scalene muscles and sternomastoids also become involved, serving to raise and push out the upper ribs and the sternum.
During active expiration, the most important muscles are those of the abdominal wall (including the rectus abdominus, internal and external obliques, and transversus abdominus), which drive intra-abdominal pressure up when they contract, and thus push up the diaphragm, raising pleural pressure, which raises alveolar pressure, which in turn drives air out.
The internal intercostals assist with active expiration by pulling the ribs down and in, thus decreasing thoracic volume.