Reverse Osmosis works the following way.
You have three water streams. One incoming stream, and two output streams.
There is a membrane separating the two output streams right down the middle. The input stream enters one side of the membrane but doesnt travel through it, it travels along it, as it travels along the membrane, the microscope holes are small enough to let water molecules through, but not lumps of crap like bugs, bacteria, and calcium etc. That crap carries along the one side of the membrane and goes to drain, but as the water molecules have enough space to enter the other side of the membrane through the microscopic holes and there is a lower pressure differential on the other side of the membrane, some of the water osmates (migrates) to the other side leaving the crap behind.
This means that there are now two sepreate channels of water, one with a relatively high concentration of crap in it, and the other with a relatively low concentration of crap in it.
You discard the rubbish dirty water and keep the pure.