How do I build a patio garden wall?

A few years ago, we added a tiled outdoor patio onto the back of our house. we are on a small hill and the dirt seems to travel down during rainy times. We are thinking of creating some type of wall around the two exposed sides of the patio to keep the deterioration down and also for a place to grow some vegetables and plants to enhance the look for the patio and yard. We are not sure exactly how to go about building this wall and what is the best materials to use. Any advise is appreciated.

  3 answers