Water, carbon dioxide, and oxygen are among the few simple molecules that can cross the cell membrane by diffusion (or a type of diffusion known as osmosis ). Diffusion is one principle method of movement of substances within cells, as well as the method for essential small molecules to cross the cell membrane. Gas exchange in gills and lungs operates by this process. Carbon dioxide is produced by all cells as a result of cellular metabolic processes. Since the source is inside the cell, the concentration gradient is constantly being replenished/re-elevated, thus the net flow of CO2 is out of the cell. Metabolic processes in animals and plants usually require oxygen, which is in lower concentration inside the cell, thus the net flow of oxygen is into the cell.
Osmosis is the diffusion of water across a semi-permeable (or differentially permeable or selectively permeable) membrane. The cell membrane, along with such things as dialysis tubing and cellulose acetate sausage casing, is such a membrane. The presence of a solute decreases the water potential of a substance. Thus there is more water per unit of volume in a glass of fresh-water than there is in an equivalent volume of sea-water. In a cell, which has so many organelles and other large molecules, the water flow is generally into the cell.