Gas exchange, the actual transfer of oxygen into the bloodstream and carbon dioxide out of it, happens in the lungs using nothing but diffusion, the same passive process that spreads any dissolved substance from where it's more concentrated toward where it's less, with no dedicated pump or active transport mechanism moving these gases across at all. The respiratory system's entire structural job, breathing air in and out, maintaining blood flow past the lungs, is really about maintaining exactly the concentration difference across the lung tissue that makes this passive diffusion actually happen fast enough to keep the body supplied.
Diffusion alone moves oxygen and carbon dioxide in opposite directions at once
Freshly breathed air arriving in the lungs carries a considerably higher concentration of oxygen than the blood arriving at the lungs from the rest of the body, so oxygen diffuses from the air into the blood, moving down that concentration difference. Blood arriving at the lungs simultaneously carries a considerably higher concentration of carbon dioxide, a metabolic waste product, than the freshly breathed air does, so carbon dioxide diffuses the opposite direction, out of the blood and into the air to be exhaled. Both transfers happen simultaneously, purely because diffusion pushes each gas independently down its own concentration gradient.
Breathing and blood flow exist specifically to keep that concentration gradient steep
Diffusion happens faster when the concentration difference driving it stays large, so the respiratory system's actual work, continuously breathing fresh air in and stale air out, continuously circulating blood past the lung tissue, exists specifically to keep replenishing that concentration difference rather than letting it level out and diffusion slow to a crawl. This is exactly why breathing rate increases during exercise: the body isn't pumping gas across the lung tissue any harder in a mechanical sense, it's refreshing the air and blood supply faster to keep the underlying diffusion gradient steep enough to meet the body's increased demand.
What we're still unsure about
That gas exchange across lung tissue happens through passive diffusion driven by concentration differences, with breathing and circulation working to maintain those differences, is extremely well established, thoroughly confirmed respiratory physiology. What's more genuinely a matter of ongoing clinical and physiological complexity is exactly how the body actually fine-tunes breathing rate and depth in real time to match rapidly changing demand, since the body's sensing and regulatory mechanisms for detecting exactly when more gas exchange is needed involve a genuinely intricate feedback system, and researchers continue to study exactly how that regulatory system adapts under conditions like high altitude or serious lung disease where the normal diffusion gradient is itself compromised.
This sits inside Respiratory System & Gas Exchange, one of eight topics in Human Biology, one of six domains in Biology, one of seventeen subjects the app can quiz you on.