Kidney dialysis is a treatment for kidney failure that involves removing waste and excess water from the blood. There are two main types - hemodialysis which uses a dialysis machine to filter the blood outside the body, and peritoneal dialysis which uses the lining of the abdominal cavity. The dialysis machine works via diffusion and ultrafiltration across a semi-permeable membrane, allowing toxins and water to pass out of the bloodstream and be replaced by clean dialysate fluid. Researchers are developing wearable artificial kidneys to allow for more continuous dialysis treatment and improved patient mobility and quality of life.