Once you've dug your trench, lay in your "footer" stones. Depending on the depth needed for your trench, your first layer, and even subsequent courses, may be entirely below ground level. Use the heaviest and ugliest stones, since you can bury odd ends and angles in the earth without worrying about them touching anything else. Lay them in several inches apart to help with drainage -- you can fill those spaces in with smaller rocks -- and if possible, try to create a shallow V shape down the center (the midpoint between each side of the wall, running the entire length of the structure). This will set up a support system in the levels (also called "courses" or "steps") that follow, where higher stones are pushing against each other from the two outer sides of the wall.
Keep in mind that gravity pulls straight down. That's the No. 1 rule to remember, because it makes the physics of the whole thing make more sense. You start with a level base, and each successive course you lay atop of it is going to be pulled straight down, which is what will keep the wall in the shape you define, hopefully for a very long time.
(If you're building a mortared wall, this first level gets a full concrete pour, as well as rebar -- reinforced steel rods -- the height of your finished project, planted at six-foot intervals. Of course, a dry-stone wall could benefit here from concrete as well, depending on whether you're willing to fudge your stance as a purist a little for the sake of a balanced foundation -- in that case, you would forego the rebar.)