Dialysis removes the waste products and extra fluid from your blood by filtering them through a membrane/filter, similar to the way healthy kidneys would. During dialysis, blood is on one side of the membrane/filter and a special fluid called dialysate (containing water, electrolytes, and minerals) is on the other. Small waste products in your blood flow through the membrane/filter and into the dialysate.
Larger particles, like red blood cells, remain in your blood. In this way, your blood is cleaned.
During diffusion, particles in the areas of high concentration move towards the area of low concentration. Picture how a tea bag works: the leaves stay in the bag and the tea enters the hot water. In dialysis, waste in your blood moves towards dialysate, which is a drug solution that has none (or very little waste). The amount of waste removed depends on the size of the waste, the size of the pores (holes) in the membrane, what the dialysate is made of and, like a tea, the length of treatment.1
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 blood to the dialysate through a membrane until the fluid level is the same between blood and dialysate.
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 blood.
Schatell D, Agar J. Help, I need dialysis! How to have a good future with kidney disease. Madison, WI: Medical Education Institute Inc. 2012. p. 34–38.