- Get oxygen into the body. Every part of the body needs oxygen to survive. The only way humans can get oxygen is to breathe it in.
- Get carbon dioxide (CO2) out of the body. When the body makes energy, carbon dioxide gets left over. The body needs to get rid of extra carbon dioxide, because too much of it is poisonous. The only way humans can get rid of carbon dioxide is to breathe it out.
When a person breathes in, they bring air into their lungs. Air has oxygen in it. The oxygen goes from the lungs into the person's bloodstream. When oxygen goes into the bloodstream, extra carbon dioxide comes out and goes into the lungs. This is called gas exchange: basically, oxygen and carbon dioxide are changing places. Oxygen is now in the bloodstream, which can carry that oxygen around to every part of the body. Also, carbon dioxide is now in the lungs, where it can be breathed out.
Adults breathe about 18 times a minute, which is more than 25,000 times a day. Children breathe even faster.
How the brain controls breathing
A part of the brainstem called the medulla oblongata controls breathing. Groups of neurons in the medulla tell the breathing muscles when to breathe in, when to breathe faster, and when to breathe slower.
The brainstem measures how much carbon dioxide is in a person's blood. If there is too much carbon dioxide, the medulla tells the body to breathe faster. This helps the person breathe out the extra carbon dioxide. Once the amount of carbon dioxide in the blood is normal again, the medulla tells the body to breathe slower again.
The body also measures the amount of oxygen in the blood. If there is not enough oxygen in the blood, the medulla will tell the body to breathe faster, to take in more oxygen. Once there is enough oxygen in the blood, the medulla will tell the body to breathe slower again.
For a person to breathe, certain muscles have to contract (get tighter) and relax at the right times. The special groups of neurons in the medulla tell these breathing muscles when to contract (which makes a person breathe in) and when to relax (which makes a person breathe out). There are a few main groups of muscles that control breathing.
The diaphragm is the main muscle that controls breathing. It is a sheet of muscle that runs along the bottom of the rib cage. When the diaphragm is relaxed, it is shaped like a dome (like a half circle). When the medulla tells the diaphragm to make the body breathe in, the diaphragm pulls down and straightens out. This creates more room inside the chest, and more room for the lungs to fill up with air. Air comes into the lungs (this is inhalation). When it is time to breathe out, the diaphragm relaxes again and air leaves the lungs.
About 60% - 70% of a person's ability to breathe comes from the diaphragm.
The diaphragm is controlled by a special set of nerves called the phrenic nerves. The medulla tells the diaphragm when to contract by sending messages through the phrenic nerves. Because the diaphragm is so important for breathing, the phrenic nerves are very well protected in the body. They are at the very top of the spinal cord, near the neck. 
The intercostals (rib muscles)
When a person is resting, the about 30% to 40% of their ability to breathe comes from the intercostal muscles.
The intercostal muscles are controlled by the intercostal nerves. The medulla tells the intercostals when to contract by sending messages through these nerves. The intercostal nerves are not as well protected as the phrenic nerves. The intercostal nerves run along the thoracic spine (which is in the upper to middle back) and connect to the intercostal muscles. This means that if a person injured their thoracic spine, they might not be able to use their intercostal muscles. They would then lose 30% to 40% of their ability to breathe. However, since the nerves that control the diaphragm are much farther up in the spine and better protected, the person would still be able to use their diaphragm to breathe. They would still have 60% to 70% of their ability to breathe.
Accessory muscles are muscles that a person uses only when they need extra help breathing. Sometimes this is normal. For example, if a person has just done a lot of exercise, they may need extra oxygen. The medulla will tell the accessory muscles to kick in, to make it easier for the person to lift their chest to create more room for the lungs to fill. The most important accessory muscles are the muscles in the chest, abdomen, and neck.
However, if a person has to use accessory muscles to breathe while they are resting, this is a sign that they are not getting the oxygen their body needs. They may need medication, extra oxygen given through a mask, or even emergency medical treatment to help them breathe normally. For example, people with asthma or chronic obstructive pulmonary disease (COPD) often use an inhaler when they have trouble breathing. The inhaler puffs a medicine like albuterol down into the windpipe and into the lungs. This makes the air passages wider and helps the person breathe better than they could before.
- Template:Cite book
- Lechtzin, MD, MHS, Noah. "Exchanging Oxygen and Carbon Dioxide". Merck Manual. Merck & Co., Inc. Retrieved January 29, 2016.CS1 maint: Multiple names: authors list (link)
- "Control of Breathing". Introduction to Respiratory & Cardiovascular Physiology. University of the West of England, Bristol. 2016. Retrieved January 29, 2016.
- Cordovez JM, Clausen C, et al. 2008. "A mathematical model of pH(i) regulation in central CO2 chemoreception". Advances in Experimental Medicine and Biology 605: 306-311. doi:10.1096/fj.1530-6860.
- Coates EL, Li A, et al. 1993. "Widespread sites of brain stem ventilatory chemoreceptors". Journal of Applied Physiology (American Physiological Society) 75 (1): 5-14. ISSN 1522-1601. PMID 8376301. http://jap.physiology.org/content/75/1/5. Retrieved January 29, 2016.
- "Pulmonary Advanced Physical Diagnosis: Physiology". Loyola University Medical Education Network. Loyola University Chicago. Retrieved January 29, 2016.
- "Albuterol". The American Society of Health-System Pharmacists. Retrieved Dec 29, 2016.