The primary function of the respiratory system is to supply the blood with oxygen in order for the blood to deliver oxygen to all parts of the body. The respiratory system does this through breathing. When we breathe, we inhale oxygen and exhale carbon dioxide. This exchange of gases is the respiratory system's means of getting oxygen to the blood.
Respiration is achieved through the mouth, nose, trachea, lungs, and diaphragm. Oxygen enters the respiratory system through the mouth and the nose. The oxygen then passes through the larynx (where speech sounds are produced) and the trachea which is a tube that enters the chest cavity. In the chest cavity, the trachea splits into two smaller tubes called the bronchi. Each bronchus then divides again forming the bronchial tubes. The bronchial tubes lead directly into the lungs where they divide into many smaller tubes which connect to tiny sacs called alveoli. The average adult's lungs contain about 600 million of these spongy, air-filled sacs that are surrounded by capillaries. The inhaled oxygen passes into the alveoli and then diffuses through the capillaries into the arterial blood. Meanwhile, the waste-rich blood from the veins releases its carbon dioxide into the alveoli. The carbon dioxide follows the same path out of the lungs when you exhale.
The diaphragm's job is to help pump the carbon dioxide out of the lungs and pull the oxygen into the lungs. The diaphragm is a sheet of muscles that lies across the bottom of the chest cavity. As the diaphragm contracts and relaxes, breathing takes place. When the diaphragm contracts, oxygen is pulled into the lungs. When the diaphragm relaxes, carbon dioxide is pumped out of the lungs.