During reverse osmosis, water passes through a membrane that separates the water into two streams: pure drinking water and wastewater.
This is why most RO systems include a storage tank. The pure drinking water goes back into the house while the wastewater goes down the drain.