What determines the need for dialysis, and how does dialysis cleanse the blood?
The kidneys keep the blood composition within normal limits, so when they are no longer able to do that, we must take over some of that function. Dialysis is a way of getting some soluble molecules out of a solution, in this case the plasma. There is peritoneal dialysis, where a buffered saline is instilled into the abdominal cavity; metabolites diffuse into it, and after a time the fluid is withdrawn and discarded. And there are machines which take blood, dialyze it, and return it to a vein.