The lungs are the primary organ of the respiratory system. The lungs are two large, spongy organs located on either side of the chest, protected by the rib cage. The primary function of the lungs is to facilitate the exchange of oxygen and carbon dioxide between the air we breathe and our bloodstream.