A retaining wall is a structure that we build usually to hold back or contain something within certain boundaries. It's similar to a fence, but not as high. Plus, the retaining wall is constructed of stronger material that lasts much longer, as long the retaining wall is designed and build structurally sound. Its main purpose is to hold back soil or rock from a building, structure or area. Retaining walls also prevent downslope movement of materials, like erosion of dirt and water.
In the case of water, the retaining wall can provide a retention in amount of flow. Though a good retaining wall should will also incorporate a good sound drainage system; the walls job is not to hold back the water, but to divert it, to slow it down and distribute the movement and flow evenly. It also provides support for vertical or near-vertical grade changes.
Cofferdams and bulkheads, are structures that hold back water, and are sometimes also considered retaining walls. Retaining walls are generally made of masonry, stone, brick, concrete, vinyl, steel or timber.
Segmental retaining walls have gained favor over poured-in-place concrete walls or treated-timber walls. They are more economical, easier to install and more environmentally sound.
The most important consideration in proper design and installation of retaining walls is that the retained material is attempting to move forward and downslope due to gravity.
This creates a lateral earth pressure behind the wall, which depends on the angle of internal friction (phi) and the cohesive strength (c) of the retained material, as well as the direction and magnitude of movement the retaining structure undergoes.
Lateral earth pressures are typically smallest at the top of the wall and increase toward the bottom. Earth pressures will push the wall forward or overturn it, if not properly addressed. Also, any groundwater behind the wall that is not dissipated by a drainage system causes an additional horizontal hydraulic pressure on the wall.
For more information on this subject, please click on "Retaining Walls" to read further at Wikipedia.