A wall bounds or subdivides spaces. Walls are usually vertical, or near vertical, planar elements, often designed to bear structural loads. It can also simply be an architectural element which is non-load bearing.
A gravity retaining wall is designed to withstand shear loads. Such walls are often designed having a non-rectangular cross section along the wall path. They are used to protect against soil layers behind.