As I am sure we all remember from high school chemistry, osmosis occurs when a liquid passes from a region where it is highly concentrated through a semipermeable membrane to a region of lower concentration. In doing so, it raises the volume of the lower concentration fluid which means energy is produced.
Where does this reaction occur all over the planet? Where ever fresh water and the more concentrated salt water meet, that is at any place that a river runs into the ocean. The saltwater molecules can pull fresh water through the membrane, increasing the volume in the saltwater tank. The resultant build up of pressure of water is used to run a turbine.
Prototype plants are running in Norway and Japan. So far they are only able to generate less that a watt of energy per square meter of membrane, far below the 5 watts which would begin to make it cost effective. Newer membranes are necessary to make it cost effective.