RO membranes are, as the name implies, nothing more than a semi-permeable membrane. Water is placed against one side of the membrane under pressure. The membrane will only pass pure water though, almost all solid matter in the water will not pass through.
A good comparison is a latex balloon. Latex is a semi-permeable material. Helium is less dense than air, which is why a latex balloon filled with helium "deflates" over a period of days, while an air filled balloon deflates slowly, because larger Oxygen, Co2, and Nitrogen molecules in a ballon filled with regular air escape more slowly or not at all.
By reading that, you'd think that the membrane would clog very quickly. Quite right, except on the "input" side of the membrane, there is also a waste output that is limited in flow by a restrictor. This keeps the pressure up, yet allows for some water movement on that side of the membrane. The particles that do not pass through the membrane find their way out in the reject water.
So basically, the waste water consists of input water, PLUS all of the crap that the filter wouldn't pass.
In a theoretical example... say the water going into the membrane (source water) has a TDS of 200. In our example, the membrane produces on a 3:1 ratio, so for every 4 gallons of water that goes in, one gallon of pure water (product water) is produced, and 3 gallons of rejected water (waste water) is produced. The output water has a TDS of 20.
So, you have a 90% efficient membrane. In our example, 1 gallon of water has had "180 of it's solids" removed. This means that the waste water will contain that 180, PLUS whatever it had to begin with, since the waste water does not get filtered. Since it's diluted into 3 gallons, take that 180, divide by 3, and add that to the TDS of the source water. Ergo the waste water TDS will be 260.
Of course this is just an example, the actual product/waste ratios, input and output TDS, etc will all vary according to pressure, the quality of the source water, and the operational efficiency/state of the membrane.
The inline TDS meters are great, but to be honest, I prefer the handheld units. In my case I operate a tank in my office at work as well as home, and I have an RODI unit for each, so I can carry it from place to place, and I always worry that the inline meters are not accurate, and it's difficult to test them against a known source to verify their accuracy. I paid $20 for my meter.