In a river or stream, the water is influenced by gravity, and flows downhill to reduce its potential energy. The movement of water in a stream is called the current and varies from place to place and time to time dependent upon the volume of water, the slope, and shape and other characteristics of the bed.
In the open ocean, currents are also driven by gravity, but in this case the motion is caused by the differing densities of bodies of water at different temperatures: warmer water is less dense and tends to float, while cooler water is denser and tends to sink.