The respiratory system has three main functions: external respiration, the transport of gases, and internal respiration. External respiration involves extracting carbon dioxide from tissues and discharging it into the atmosphere. The air passage divides 23 times between the trachea and alveolar sacs. It can be divided into two zones: the conducting zone where no gas exchange occurs, and the respiratory zone where gas exchange takes place in the alveoli. The lungs also have non-respiratory functions like humidifying and warming air, resisting infection, and filtering the pulmonary circulation.