How do substance like carbon dioxide and water move in and out of the cell?
$\mathrm{CO}_{2}$ moves into and out of cells by diffusion while water does it through osmosis.
Diffusion. It is movement of particles of various substances from the region of their higher concentration to the region of their lower concentration,
1. In a respiring cell, more $\mathrm{CO}_{2}$ is produced internally. As a result its internal concentration rises. As concentration of $\mathrm{CO}_{2}$ is lower in the outside medium, $\mathrm{CO}_{2}$ passes out from cell into external medium,
2. In photosynthetic cell, $\mathrm{CO}_{2}$ is being consumed in photosynthesis. Its intracellular concentration is lower than outside medium. Therefore, $\mathrm{CO}_{2}$ diffuses from outside to inside of the cell.