Breathing is an automatic and rhythmic act produced by networks of neurons in the hindbrain (the pons and medulla).
The neural networks direct muscles that form the walls of the thorax and abdomen and produce pressure gradients that move air into and out of the lungs. The respiratory rhythm and the length of each phase of respiration are set by reciprocal stimulatory and inhibitory interconnection of these brain–stem neurons.
Breathing is controlled by autonomic nervous system. The respiratory centers that control rate of breathing are in the brainstem and medulla. The nerve cells that live within these centers automatically send signals to the diaphragm and inter–costal muscles to contract and relax at regular intervals. However, the activity of the respiratory centers can be influenced by these factors:
eripheral chemo–receptors (monitor the O2 concentration), central chemo–receptors (monitors CO2 concentration). Stretch receptors in the lungs and chest wall monitor the amount of stretch.