Exchange of gases takes place on the surface of alveoli present in the lungs. It happens through the process of diffusion, which takes place when there is a difference in the partial pressures of the gas in two media.