Gas exchange takes place in the alveoli as well as in the tissues. The gases move by a process called diffusion, wherein the gases move from an area of higher concentration to an area of lower concentration.
Air in alveoli have higher concentration of oxygen than the alveolar blood capillaries and hence oxygen diffuses from alveolar air to blood. Also the blood in capillaries has greater concentration of carbon dioxide than the alveoli and hence carbon dioxide diffuses from blood to capillaries. This oxygen rich blood reaches the tissues wherein oxygen from blood diffuses into the cells (with lower concentration of oxygen) and carbon dioxide from cells (with greater carbon dioxide concentration) diffuses into the blood capillaries supplying them.