First of all: the dialysis fluid is made of A+B fluid, and the ion concentration is basically about the same as the human body environment.
Inside the dialysis machine: purified RO water enters into the dialysis machine and mixes with AB liquid to become dialysis liquid. In the middle, there are air separation, balance chamber, blood leakage sensor, temperature sensor, heating rod, degassing pump, flow pump and other parts. Finally the dialysate comes out through a tube with a connector, which you can understand as external circulation.
The internal circulation is that the blood passes through the hollow fiber of the dialyzer, and according to the principle of ultrafiltration and diffusion, the water and ions in the blood are stripped out (and the dialysate on top of it is convected, of course, separated by a semi-permeable membrane).
Here's a diagram of the internal water circuit of the Fresenius 4008S.