Retaining walls are great structures to improve the look of your garden. They allow you to create many different levels in your garden that are clearly separated, meaning you can plant a wide variety of plants and flowers to create visual interest. The wall itself can also look very good if you choose a material that complements your garden and house. The most important thing to think about when building a retaining wall is that it's strong enough to hold the soil back. In order to achieve that, there are a few things you should think about as you're building the wall.
The first thing you need to think about as you're building a retaining wall in your garden is to make sure it's buried properly. You should dig the wall partially down in the ground to give the retaining wall a firm base to grow out of. If you're constructing your wall out of bricks, then make sure that at least one and a half layers of the bricks are buried. Avoid burying just one layer, as this might apply too much pressure on the seam created when you put the bricks together which could cause the bricks to break off.
You should also avoid making the retaining wall completely vertical. A vertical wall will have a difficult time holding a mass of soil that is pushing towards it without giving out due to gravity. Construct your wall to lean slightly into the soil that it is retaining and make sure it's firmly planted in the ground, as this is where the force from the soil gets concentrated. Make sure the lean is straight so that the middle section of the retaining wall isn't bulging out. A bulging section creates a weak spot where the force of the soil could actually push the middle section out of the wall and cause it to crack.
If you don't like the look of a leaning retaining wall, you could add a filler material instead. Make the wall vertical, but fill the space between the wall and the soil into a triangle shape. The filler material will lean against the soil, but the wall itself will appear vertical. The downside of this is that you won't be able to plant anything on top of the filler material, creating an edge behind the wall that will be without vegetation. If you choose this option, you should choose a filler material that matches the nuance of the soil itself to make it appear invisible. Avoid plain concrete, as that is unlikely to withstand the pressure of being dug down in the ground and might break.