The goal of reverse osmosis is to filter dissolved substances and ions from water. High pressure forces water across a semi-permeable membrane, which is porous enough to allow water molecules through but blocks the passage of dissolved substances like salt ions. This pressure forces the water through the membrane in the opposite direction from the one it would otherwise take. This leaves dissolved solutes and contaminants behind.
Reverse osmosis is an extremely effective filtration technique. Depending on the type of membrane and the system used, reverse osmosis systems can remove 85 percent to 98 percent of total dissolved solids from water. Bacteria and viruses are much larger than ions or molecules of dissolved solids, so reverse osmosis removes these contaminants as well, although some gases, like dissolved oxygen or hydrogen sulfide, will pass through the membrane.