This isn't an exact scientific description!
The RO unit pushes water molecules through a membrane and doesn't allow the larger dissolved solids molecules to pass. You need the waste water to flush the excess dissolved solids away.
To convince yourself that this is exactly what happens, take three TDS reading of:
Regular tap water (probably a couple of hundred or so)
RO output water (should be very low - between 002 and 010)
RO waste water (considerably higher than regular tap water)
That shows you what happens.