Ocean currents can be formed by wind, gravity, earthquakes and temperature and salinity variations that cause density differences in the water mass, according to the National Oceanic and Atmospheric Administration. Some ocean currents are short lived and don't go far, while others last for a very long time and can take centuries to complete one circuit of the earth.
Ocean surface currents are created mainly by wind, and the speed and direction of the wind dictate which way the current moves, describes NOAA's Ocean Explorer web page. The Coriolis forces from the earth's rotation also can have an effect on currents. The position of landforms can make a difference because ocean surface currents, in conjunction with the landforms, generate upwelling currents that create deepwater currents.
Temperature and salinity differences causing density changes in the water mass can generate currents. These currents take oxygen, heat and nutrients with them. Events on earth also occasionally generate currents such as huge storms or underwater earthquakes. The huge storms with strong winds can move large masses of water, creating serious currents. The underwater earthquakes can cause tsunamis that move large masses of water and create serious currents. Currents on the bottom of the ocean can shape and form an underwater area of the earth.