The oceans of the world are constantly moving. These movements occur in currents, which, though not always constant, have certain very observable tendencies. As the ocean waters swirl around in currents, they affect the climates of the world's coastal lands significantly.
In the northern hemisphere, ocean currents tend to flow in a clockwise motion. In the southern hemisphere, they tend to flow in a counterclockwise motion. These circular flows are called gyres, and they do sometimes reverse.
Just as the heating of air close to the ground causes convection that is the source of virtually all meteorological phenomena, the heating of equatorial waters is the cause of virtually all ocean currents. As water heats, it expands and this expansion causes it to push outward into cooler areas. As it cools, it contracts, and this contraction causes it to flow toward the area vacated by warm water.
When land borders the ocean, the currents of the ocean warm or cool it, depending on the nature of the particular current that flows by that land. In cases where a warm current flows along a particular coast, that coastal area will generally be warmer than it would otherwise be if it were landlocked. Similarly, cool currents cause coastal lands to remain cooler than they would be if they were landlocked.
Southern California and Arizona have the same latitude. However, Arizona summers are extremely hot, while Southern California summers are generally quite mild. This is because a cool Pacific current flows down from Alaska and follows the coast of the Western United States. As this current flows by California, it keeps California cool. Arizona, though, is so far away from the ocean that the current has little effect. Similarly, coastal areas of northern Scandinavia and northwest Russia are often able to remain ice-free through the winter because of a warm current that flows there from the central Atlantic.
Sometimes, shifts in ocean currents do occur. The most famous of such current shifts is El Niño. This happens when the Pacific currents switch direction, causing warm waters to flow along the American coasts and cool waters to flow along the Asian and Australian coasts. This change causes many meteorological anomalies, such as droughts and large storms at unexpected times and places.