Dialysis is the process used to change the matrix of molecules in a sample by differentiating molecules by the classification of size. It relies on diffusion, which is the random, thermal movement of molecules in solution (Brownian motion) that leads to the net movement of molecules from an area of higher concentration to a lower concentration until equilibrium is reached. Due to the pore size of the membrane, large molecules in the sample cannot pass through the membrane, thereby restricting their diffusion from the sample chamber. By contrast, small molecules will freely diffuse across the membrane and obtain equilibrium across the entire solution volume, thereby changing the overall concentration of these molecules in the sample and dialysate (see dialysis figure at right). 
Osmosis is another principle that makes dialysis work. During osmosis, fluid moves from areas of high water concentration to lower water concentration across a semi-permeable membrane until equilibrium. In dialysis, excess fluid moves from sample to the dialysate through a membrane until the fluid level is the same between sample and dialysate.
Finally, ultrafiltration is the convective flow of water and dissolved solute down a pressure gradient caused by hydrostatic forces or osmotic forces. In dialysis, ultrafiltration removes molecules of waste and excess fluids from sample.
For example, dialysis occurs when a sample contained in a cellulose bag and is immersed into a dialysate solution. During dialysis, equilibrium is achieved between the sample and dialysate since only small molecules can pass the cellulose membrane, leaving only larger particles behind.
Once equilibrium is reached, the final concentration of molecules is dependent on the volumes of the solutions involved, and if the equilibrated dialysate is replaced (or exchanged) with fresh dialysate (see procedure below), diffusion will further reduce the concentration of the small molecules in the sample.
Dialysis can be used to either introduce or remove small molecules from a sample, because small molecules move freely across the membrane in both directions. Dialysis can also be used to remove salts. This makes dialysis a useful technique for a variety of applications. See dialysis tubing for additional information on the history, properties, and manufacturing of semipermeable membranes used for dialysis.