This dialysate is later discarded and fresh dialysate is put in, just as with hemodialysis. Fluid removal works a bit differently with peritoneal dialysis. Into the dialysis solution glucose is incorporated. This glucose, depending on the amount, draws out water from the blood, and into the dialysate. Again, this dialysate is discarded with the excess fluid, and the process starts again.
Osmosis allows only the smaller molecules to pass through a membrane.
I hope this has helped to somewhat de-mystify the way dialysis works. Used under License.