The respiratory system brings oxygen into the lungs and blood through breathing. Air enters the lungs through the windpipe and branches into smaller tubes called bronchi and bronchioles. The bronchioles end in tiny air sacs called alveoli that are surrounded by capillaries. Oxygen passes from the alveoli into the blood in the capillaries, while carbon dioxide passes from the blood into the alveoli to be exhaled. The diaphragm and ribs help expand and contract the lungs during inhalation and exhalation.