RESPIRATION
Pressure differences cause the flow of air into and out of lungs. Contraction of the diaphragm enlarges the thoracic cavity, thereby decreasing pressure in the thoracic cavity so that it is less than the atmospheric pressure outside; air flows from the region of higer pressure (outside) through the mouth, nose, trachea.... and into the alveoli of the lungs inside the thoracic cavity where the pressure is lower. When the diaphragm relaxes, the thoracic cavity becomes smaller, pressure increases and air flows back out.
Anything that helps to enlarge the thoracic cavity during inhalation, will help create the low intrathoracic pressure and aids inspiration. Muscles that cause or aid inspiration: diaphragm, external intercostal muscles, neck muscles (sternocleidomastoid muscle); swinging arms can also help enlarge the thoracic cavity and helps inspiration during, e.g., exercise.
Exhalation can be entirely passive: just stop contracting the muscles of inspiration and the thoracic cavity becomes smaller...and air flows out of the lungs and into the environment. However, we can help force air out of the lungs (forced expiration) e.g. during coughing, or shouting, or sneezing, or singing, or...
Forced expirations are due mainly to the contraction of abdominal muscles (have you ever laughed so hard your "sides" hurt?), but the internal intercostals can also be made to contract and that will help force air out of the lungs.
Ventilation
Ventilation is simply the movement of air into and out of the lungs. There are various volumes that respiratory physiologists and physicians...use to assess how well we are able to ventilate the lungs:
Tidal volume, VT, volume of air inhaled in a normal single, normal breath (~0.5 L) (usually it is equal to the volume of air exhaled in a single, normal breath, too.
functional residual capacity, FRC, volume remaining in the lungs after exhalation of tidal volume (~2.5 L)
expiratory reserve volume, ER, volume of a maximal exhalation (~1.5 L)
residual volume, RV, volume remaining in lung after maximal exhalation (~1L)
inspiratory reserve volume, IR, additional volume that can be inhaled after inhalation of tidal volume
vital capacity, VC, maximum volume of exhalation after lungs are maximally filled
Probably the best easy clinical indicator of breathing is Vital Capacity. But if you know Tidal Volume, you can calculate the overall flow of air into the lungs (the "minute ventilation"; analagous to cardiac output)
minute ventilation = tidal volume times the respiratory rate (0.5 liter/breath times 10 breaths/min = 5 liters per minute)
Of course the importance of the respiratory system (in addition to the regulation of acid/base we talked about before) is getting oxygen into the alveoli so it can diffuse into the capillaries, so it can be delivered in the blood to the tissues.
Well, not all of the oxygen that is available in the air is actually available to the alveoli. When you inhale air, the inhaled air mixes with the air that is left in the nose, mouth, trachea, bronchii, and bronchioles, from the last exhalation. So the air that reaches the alveoli during inspiration is not entirely "fresh". If a normal tidal volume is 500 ml, only about 350 ml of it is actually "fresh", the other 150 ml is air from the last exhalation and contains lots of carbon dioxide.
We say that the fresh air mixes with exhaled air as the inhaled air flows into the nose, mouth, trachea, bronchii, and bronchioles (altogether these areas comprise a volume of about 150 ml and are called "dead space".
The measurement of ventilation that take dead space into account is called "alveolar ventilation"
ALVEOLAR VENTILATION = (tidal volume minus dead space) times respiratory rate (350 ml times 10 breaths per minute = 3500 ml or 3.5 liters)
Gas exchange
Instead of talking about the "concentration" of a gas, we talk about their pressures. This is because, gas moves from regions of its high pressure to regions of its low pressure in the same way that solutes in solutions move from the solute's region of high concentration to its region of low concentration.
Unlike "concentration", pressure is a relative term. All gas pressures are relative to the atmospheric pressure. At sea level, atmospheric pressure is about 760 mmHg. That pressure is exerted by the motion of gas molecules in the atmosphere. Since air contains more than one gas (e.g. oxygen, nitrogen, water vapor, carbon dioxide, trace amounts of other gasses, volatile pollutants...) then each gas contributes to part of the total pressure of 760 mmHg. The relative contribution of each gas is known as the "partial pressure" of that gas and it depends on that gas's proportion of the mixture (usually measured as a percentage).
For the following discussion, in order to keep things simple, we will ignore all the trace gasses (e.g. CO2 only makes up about 0.03% of air, so forgetaboutit) and even the water vapor content of air (which varies with the humidity). Another simplification will be to assume we are always at sea level where the atmospheric pressure is 760 mmHg.
At sea level, air pressure = 760 mmHg, but since air = ~21% oxygen, ~79% nitrogen:
part of pressure exerted by oxygen (called the partial pressure of oxygen or PO2) = 21% of 760 mmHg = 160 mmHg.
part of pressure exerted by nitrogen (called the partial pressure of nitrogen or PN2) = 79% of 760 mmHg = 600 mmHg.
GAS EXCHANGE
Remember, the point of breathing is to get rid of carbon dioxide and to oxygenate the blood flowing through the capillaries next to the alveoli. Oxygen has to get from the outside air to the alveoli to the capillary blood; carbon dioxide has to get from the capillary blood to the aveoli to the outside air. In other words we "exchange" oxygenated air for carbon dioxidinated (?) air.
Gas exchange depends on diffusion of each gas from regions of its own high partial pressure to a region of its own low partial pressure.
So, air (PO2 = 160 mmHg) is inhaled, it mixes with the dead space air (which is high in CO2 content), so instead of being 21% of the gas presented to the alveoli, oxygen only makes up about 13% of the gas: 13% of 760 mmHg = ~100 mmHg; so the partial pressure of oxygen in the alveoli after an inspiration is about 100 mmHg.
Now the blood in the pulmonary capillaries has been through the systemic circulation and much of its oxygen has been used up making the blood low in oxygen (PO2 in venous blood is about 40 mmHg or less). So as this blood passes close to the alveoli, oxygen diffuses from the alveoli (PO2 = ~100 mmHg) across the alveolar wall, across the capillary wall and into the blood where the PO2 is lower (40 mmHg or less).The oxygen diffuses across the alveolar wall and capillary wall which usually don't offer much of a barrier to the gas's movement; but because there are always fluids and secretions present, the PO2 is reduced another few mmHg (to 90 - 95 mmHg) by the time it reaches the blood stream. This further reduction in PO2 can be much worse in circumstances such as edema, pneumonia, or fibrosis which cause an even greater decrease in the PO2 of the blood.
I hope it's obvious that oxygenation of the blood depends on breathing. But at rest, we usually do not breath very deeply and our lungs don't inflate fully, i.e. not all of the alveoli are actually ventilated. The arterioles that provide blood to the alveolar capillaries that supply those deep, unventilated alveoli will stay very constricted and actually shut off blood flow through those capillaries so that not all alveolar capillaries are open to blood flow! When we increase the depth of our inspirations and inflate those (previously uninflated) alveoli, we also increase the number of capillaries open to blood flow.
SO, we match blood flow through the capillaries ("PERFUSION") with the ventilation of the alveoli. The mechanisms underlying this response are still not understood very well (I think that just means it's complicated).
If we increase ventilation of alveoli, we increase perfusion of the lungs with blood so we can get more oxygen to our tissues.
HEMOGLOBIN
As it turns out, if we relied only on the oxygen that was dissolved in the plasma of the blood, there wouldn't be enough oxygen for our needs (i.e. just having 100 mmHg worth of oxygen in the blood wouldn't be enough). Luckily, we can pack the blood with lots more oxygen due to the presence of hemoglobin in our red blood cells. Of all the oxygen in our blood, only about 2% of it is dissolved, the other 98% is attached to hemoglobin.
Hemoglobin is protein, each molecule of it can bind up to 4 molecules of oxygen (4 O2). The amount of oxygen that binds to hemoglobin depends on PO2 in the blood.
As the blood moves through the pulmonary capillaries just after inspiration, oxygen diffuses into the plasma and into the red blood cells where it binds to hemoglobin. Since oxygen continues to diffuse from the alveoli into the plasma, the PO2 in the plasma stays at ~90 - 100 mmHg even as the hemoglobin becomes more and more saturated with the oxygen. By the time the blood leaves the capillaries on its way back to the heart, not only is there about, let's just say, 100 mmHg worth of oxygen dissolved in the plasma, but there is all the oxygen that is bound to the hemoglobin: lots of oxygen.
So, our ability to fully oxygenate the blood depends on our ability to load up the hemoglobin with oxygen. Once the blood circulates to the tissues, the oxygen has to UNbind from the hemoglobin so it can diffuse into the tissues. So what makes the O2 bind to hemoglobin in the lung and then UNbind from it in the tissues? Well the amount of O2 bound to hemoglobin depends on the PO2: where the PO2 is high, O2 will bind to the hemoglobin (PO2 is high in the lungs); where the PO2 is low, the hemoglobin will let go of the O2 (in the tissues, the tissues are using up the O2 and so PO2 there is low, ~40 mmHg.
The relationship between PO2 and the saturation of hemolobin with oxygen is illustrated in the following graph, called the "oxygen-hemoglobin dissociation curve" or sometimes, the "oxygen-hemoglobin association curve":

If you look at the curve, you can see that at a PO2 of around 100 mmHg (e.g. in the lungs), the hemoglobin is pretty dang saturated with oxygen where it will stay until the blood circulates to the tissues; at a PO2 of around 40 mmHg (e.g. in the tissues), the hemoglobin is much less saturated with oxygen (the oxygen can unbind and diffuse into the tissues where it can be used).
Things that influence the binding of oxygen to hemoglobin will, of course, affect the oxygen dissociation curve. Look at the following figure where curve A is the same as the one above, and curve B illustrates a change in circumstances:

Something has affected the binding of O2 to hemoglobin so that at a PO2 of 40 mmHg, there is less saturation of the hemoglobin with oxygen; consequently, the curve has been shifted to the right (curve B is to the right of curve A). Notice that if the curve is shifted to the right, the biggest effect is in the middle of the curve where PO2 is about the same as it is in the tissues (~40 mmHg); there doesn't seem to be much change in how saturated the hemoglobin is at higher PO2s (~100 mmHg, like it is in the lungs).
This means that shifting the curve to the right reflects that, compared to the original situation, it is easier to unload oxygen from the hemoglobin at the PO2 we find in the tissues, but it is still easy to bind oxygen to the hemoglobin at the PO2 we find in the lungs. Things that shift the oxygen-hemoglobin dissociation curve work by interacting with the hemoglobin and changing its ability to bind oxygen (e.g. causing hemoglobin to change its shape in a way that makes it harder for oxygen to bind).
Circumstances that cause the relationship to shift to the right are:
elevated [H+]
increased temperature
elevated CO2
All of these circumstances occur more in the tissues than in the lungs (the tissue is metabolizing...producing H+, producing CO2, temperature in the tissues are generally higher than in the lungs {think of inhaling all that cold, foggy San Francisco air}. So when the blood circulates to the tissues, more oxygen can be unloaded from the hemoglobin!
The presence of another compound can also shift the oxygen-hemoglobin dissociation curve to the right: 2,3-diphosphoglycerate (2,3-DPG). Remember that a shift to the right favors unloading of oxygen. DPG is a protein found in the red blood cells. Increased production of DPG occurs as a response to chronic exposure to low oxygen levels, e.g. high altitudes or in cases of chronic obstructive pulmonary disorders; in both circumstances, not as much oxygen gets into the blood circulating through the lungs.
Carbon dioxide
Just a word about the transport of carbon dioxide in the blood:
Of the total amount of CO2 in the blood, about 10% is simply dissolved in the plasma, about 30% bound to hemoglobin (in a different place than where oxygen binds), and about 60% is in the form of HCO3-.
Neural control of respiration (THIS MATERIAL IS NOT IN THE TEXTBOOK; SORRY, THIS IS REALLY YOUR BEST SOURCE FOR THIS INFORMATION AND SO THERE IS NO ACCOMPANYING READING ASSIGNMENT IN THE TEXT)
This section describes the nervous system's control of breathing. It is by no means complete. Here we will only discuss control of the diaphragm, the most important muscle of inspiration. Remember that when our diaphragms contract, air flows into the lungs and when it stops contracting (i.e. when it relaxes), air flows out of the lungs. So the diaphragm has to contract and it also has to relax in order for us to breath, but that's really about all there is to it. We are going to build our respiratory control network step by step:
The diaphragm is a skeletal muscle. The motor neurons that control the diaphragm have cell bodies in the ventral horn of the spinal cord in cervical segments 4 through 6 (C4 to C6) and send their axons to the diaphragm in the phrenic nerves. When action potentials are initiated in the phrenic neurons, they release acetylcholine on the muscle cells, initiate action potentials in the muscle cells and thereby produce contractions of the muscle.
Below, is a figure showing a cross-section of the spinal cord and the location
of the phrenic motor neurons.
These phrenic motor neurons do not just fire off action potentials all the time, they need to be "driven" by other neurons that provide them with inputs. One of the most important sources of excitatory input to the phrenic neurons comes from the medulla oblongata where there is a group of neurons called the "dorsal respiratory group". These neurons have axons that course down the spinal cord and make synapses on the phrenic neurons (see the figure below; the little + means that the dorsal respiratory group neurons cause excitation of the phrenic neurons).

These dorsal respiratory group neurons fire rhythmically at around 10 to 12 times per minute, providing the phrenic neurons and then the diaphragm producing about 10 to 12 inhalations per minute, our normal resting breathing pattern. The rhythms in firing of the dorsal respiratory group neurons probably comes from 'pacemaker neurons' (analagous to the pacemakers in the heart) that are also located in the medulla oblongata.
But that isn't all that happens. These dorsal respiratory group neurons send branches of their axons to another group of cells called the "ventral respiratory group" where they make excitatory synaptic connections. The ventral respiratory group neurons are involved in various aspects of normal as well as forced exhalations, but to keep things simple, let's concern ourselves with how they help stop the dorsal respiratory group neurons from firing and thereby act to limit the period of inhalation.
The ventral respiratory group neurons send some of their axons to another group of neurons in the medulla oblongata called the "solitary tract nucleus" where they make excitatory synaptic connections with neurons that send their axons to the dorsal respiratory group.
Well, the solitary tract neurons help to turn off (inhibit) the dorsal respiratory group neurons so that the phrenic neurons stop getting their excitatory inputs, so inspiration ceases and exhalation begins (see the figure below).

So the dorsal respiratory group excites the phrenics (which cause inspiration) AND in the meantime, the dorsal respiratory group excites the ventral respiratory group which excites the solitary tract nucleus neurons which inhibit the dorsal respiratory group and stops inspiration. It's a little cycle of activity in a neural circuit that keeps us inhaling and exhaling at a rate of about 10 to 12 breaths per minute!
There are reflexes that affect respiration. We will discuss 2 of them: the "chemoreceptor reflex" and the "Hering-Breuer reflex".
The chemoreceptors are sensory neurons that monitor the chemical composition of the blood and cerebrospinal fluid. There are two sets of chemoreceptors:
The peripheral chemoreceptors are sensory neurons that have sensory endings in the aortic arch and at the bifurcation of the common carotid arteries where they branch into the internal and external carotids. Their axons project into the medulla oblongata and make synapses on cells that excite neurons of the dorsal respiratory group resulting in increased phrenic activity and therefore deeper and more frequent inhalations. These chemoreceptors become excited by three things: a fall in PO2 in arterial blood, and/or a rise in CO2 and/or a rise in H+.
So a rise in CO2 or a fall in O2, excites the peripheral chemoreceptors and.......causes increased depth and rate of our inspirations.
The other set of chemoreceptors, the central chemoreceptors, are neurons on the surface of the medulla oblongata. These sensory neurons monitor the cerebrospinal fluid that bathes them. They don't respond to changes in PO2, but they have very strong excitatory responses (increased numbers of aciton potentials) to decreases in PCO2 and to elevations of [H+] in the cerebrospial fluid. They have the same affect as the peripheral chemoreceptors on inspiration, because they make very similar, if not the same, connections to excite the dorsal respiratory group.
So the bottom line is that increases in CO2 levels or decreases in O2 levels or a build-up in [H+] will excite chemoreceptors and stimulate inspiration through their connections with the dorsal respiratory group of neurons in the medulla.
The chemoreceptors are sensitive enough to be active even under normal circumstances and actually, even this low amount of chemoreceptor activity provides important "excitatory drive" for the dorsal respiratory group neurons. If it weren't for the chemoreceptors, our respiratory rate and depth might only be adequate for a couch potato's existence, watching really bad TV...
Another important reflex is the Hering-Breuer reflex. This reflex is due to sensory neurons that monitor the amount of stretch in our lungs and the walls of the chest. As we stretch the chest and lungs (e.g. during inhalations) these neurons become more and more excited (the bigger the stretch, the greater the number of action potentials in the sensory neurons). Theses neurons send axons to the medulla oblongata, but they make excitatory synaptic connections with the VENTRAL respiratory group of neurons. Remember that the ventral respiratory group acts to inhibit the dorsal respiratory group (by way of the solitary tract) and thereby stops inspiration.
The Hering-Breuer reflex, then, can be thought of as a reflex that ensures you don't inhale until you pop! It acts to limit the depth of inspiration.
Two groups of neurons in the pons also play a role in regulating our breathing (important in switching between inspiration and expiration) by interacting with respiratory neurons in the medulla oblongata.
The pneumotaxic center (pneumotaxic means stop breathing) excites the solitary tract neurons that inhibit the dorsal respiratory group and thereby slows or stops inhalation.

The apneustic center (apneustic means to prolong inspiration) inhibits the pneumotaxic neurons, so the pneumotaxic neurons don't turn off inspiration and therefore, the inhalation will last longer.

Remember that we also have conscious control of our breathing. This is accomplished by neurons in our motor cortex that send axons all the way to the phrenic neurons themselves (bypassing all the groups we've been talking about). The cortex can excite or inhibit the phrenic neurons. You have willful control over your breathing when you want to. You can hold your breath (at least until the chemoreceptors get excited enough to override you), you need to manipulate your breathing when you laugh, and talk and shout, and sing, and scream, and yell, and...sigh...

Some other terminology related to breathing and breathing problems:
Cheyne-Stokes breathing: successive, alternating periods of apnea and hyperventilation; can be indicative of damage such as caused by a stroke.
dyspnea, labored breathing
hyperpnea, increased depth and rate of respiration
tachypnea, increase rate of respiration
Chronic obstructive pulmonary diseases (COPD): expiration is more difficult than inspiration
apneustic (prolonged inspiratory gasps interrupted by very brief expirations)
asthma: constriction, mucous secretion, inflammation bronchitis: irritants cause edema, thickening of lining , mucous secretion emphysema: alveolar collapse from breakdown of the alveolar walls