Gas exchange takes place through the process of diffusion, across a gradient, from higher concentration to lower concentration.
Two main processes involving gas transfer that are crucial to life on Earth are Photosynthesis and Respiration. In the process of photosynthesis, plants take up carbon dioxide through stomata (located on the underside of the plant leaves) and use it along with sunlight to generate oxygen and sugar molecules. In the process of respiration, living beings (human, animals, plants at night, etc.) take up oxygen and release carbon dioxide. In case of human beings, the oxygen diffuses into blood from the alveoli, while the carbon dioxide diffuses into the alveoli from the blood. The gradient in the concentration is maintained by continuous breathing and blood flow in our body.
Hope this helps.
The process is known as photosynthesis and respiration.
Gas exchange in cells takes place through the process of respiration in animals, and photosynthesis in plants too. In animals, we take in oxygen and release carbon dioxide. This process is known as respiration. In plants, they also release oxygen and take in carbon dioxide with the help of light energy. This process is known as photosynthesis. At nighttime, they do also undergo respiration.