A retaining wall holds back soil to create level space or manage a slope. A short decorative wall is a doable DIY project, but the base and drainage are what keep it from leaning or failing over time.
Build a solid base
Dig a trench and lay a compacted gravel base, levelling it carefully — the first course sets the whole wall, so take your time. A buried first course adds stability. Each block course steps back slightly into the slope for strength.
Drainage is critical
Water building up behind a wall is the main cause of failure. Backfill behind the wall with gravel and include a perforated drain pipe at the base to carry water away, plus landscape fabric to keep soil from clogging the gravel.
Know the limits
Walls over about 3 to 4 feet, or walls holding up a driveway or structure, usually need engineering and a permit — the forces are large and failure is dangerous. For tall or load-bearing walls, hire a pro.