The respiratory system is made of the nose, pharynx, larynx, trachea, alveoli, bronchi, diaphragm, and lungs. The link below explains the function of each of these organs within the respiratory system. However, the overall function of the respiratory system is to deliver oxygen to cells so that they can undergo cellular respiration. Cellular respiration is the process that occurs within the mitochondria of a cell. It uses glucose (a sugar) and oxygen to make water, carbon dioxide, and ATP (adenosine triphosphate). The carbon dioxide that is made during cellular respiration is then removed from the organism via the respiratory system during the exhalation of the lungs.
The respiratory system works closely with the circulatory system. Arteries carry oxygenated blood that the cells can use during cellular respiration. Veins pick up the carbon dioxide that is produced.