In order to understand the method of osmosis; imagine a container with a semi-permeable divider. One half contains tap water and the other half distilled water. Nature's way for maintaining cellular fluid levels triggers a natural action in equalizing both fluids.
Distilled water has no minerals and salts, while the tap water has plenty. The distilled water is forced over tothe mineral and salt rich environment in order to equalize the minerals and salts in both fluids. This is osmosis and the pressure on the "divider" the osmotic pressure.
A carrot for example extracts water from the moistened soil by this principle. The carrot being loaded with minerals, the outside moisture being pure. The same principle is at work, if humans consume saltwater. The saltwater in the stomach extracts fresh water from outside of the cell wall (stomach) in order to equalize the fluid levels. And that is the reason why we dehydrate by drinking saltwater.
Let's turn this around. Let's put pressure on the mineral rich water forcing it through the "cell wall" or "divider" to get pure water. That is reversing the process of osmosis as we know by nature and the basic principle of reverse osmosis.
Reverse osmosis (RO) results in the purest drinking water possible. A membrane takes over instead of a "cell wall". The membrane is a dense material leaving only small molecular weight particles through, while the larger particles (salt, chemical/ organic compounds, impurities, bacteria, fungi, viruses, pesticides) are washed away.
The two types of membranes:
Cellulose Triacetate (CTA)
This film is acceptable for treating tap water that contains chlorine/ chloramine. In fact CTA needs an antibacterial substance in the water, as the film is not good in removing bacteria. CTA should not be used if the water is hard (500 ppm) or has a pH above 8.5
Thin Film Composite (TFC)
This film is acceptable for hard water and can filter out bacteria. Chlorine/ chloramine on the other hand can not be tolerated. Using a TFC membrane with tap water (public water) you must pre-filter the water to eliminate chlorine/chloramine (i.e. carbon filter).
RO units work mechanically (by pressure) and are almost maintenance free. The only maintenance there is, is the back flushing, to remove the trapped particles on the membrane.
The first one would be the water temperature; it should be between 33-85 degrees Fahrenheit (1 - 29 degrees Celsius). Everything below or above this temperature range will destroy the membrane.
Another enemy is air. The membrane has to be submersed in water at all times. The membrane is destroyed if it dries out. If you have to store it, store it in water.
RO units create a lot of wastewater. Generally, 5 Gallons on the inflow will leave you with only 1 Gallon of RO water. This can be considerably high if you think that you will need 50 Gallons of water to get 10 Gallons of RO water, wasting 40 Gallons. The "waste water" is only 20% higher on average in minerals and salts than the original water so there is no reason not to consider re-using the "waste water" for other purposes.
RO water can be used for marine and reef tanks as the salt mix provides all the essential minerals and salts needed. Straight RO water is not acceptable for freshwater as it lacks essential minerals and salts. You must learn how to adjust the water chemistry if you use RO water for freshwater tanks.