The function of kidneys is to filter the blood by removing waste and excess fluid from the body. This waste is sent to the bladder to be eliminated through urine. Dialysis replaces the role of the kidneys when they are no longer functional. Dialysis is a procedure that uses a machine to process and purify the blood. When your kidneys do not function at the optimum level, dialysis helps in keeping your fluids and electrolytes in check.