The respiratory system has two main functions: to supply blood with oxygen and remove carbon dioxide. It has an upper respiratory tract that warms and filters air and a lower tract that includes the trachea and lungs. The lungs contain millions of alveoli that absorb oxygen and release carbon dioxide and have a sponge-like structure.