Respiratory function pertains to the processes involved in the exchange of oxygen and carbon dioxide between the body and the environment. This includes the mechanics of breathing, gas exchange in the alveoli, and the transport of gases by the blood.