Dig down into your soil the length of two shovels and turn the soil over. Do this to the entire area within your marked outline. This is hard work, but the double-digging will help significantly with drainage. Dig a trench along your marked line with a trenching shovel. Place your boards in the trenches to make sure they're level. This is a permanent structure so you want it to be stable.
Roll out a tape measure to the desired length and sprinkle flour over it. Do this for all sides so you can see what it will look like in the landscape and make any adjustments you like. Although most raised beds are rectangular, they can be any size or shape you like. You should be able to access all the plants in it, though, so keep that in mind when you choose the location and the dimensions. Make sure that the area will receive enough sun exposure for the plants you plan to include.
Place all four boards in the trench, and nail your wood frame together on all sides (Image 1). Drive wooden stakes halfway into the ground at each corner (Image 2). Nail the exposed part of the stakes to the frame at each corner. Fill in the sides of the trench so the boards sit sturdy in the soil. Once you have your rectangle built, you can build up high as you want. A foot off the ground will work for most plants, but you can go higher for wheelchair accessibility or if you like the look.
If you have problems with burrowing creatures like gophers, lay some chicken wire at the bottom of the raised bed before you fill it with soil (Image 1). Remove some of the native soil you've dug up so the chicken wire can lie at ground level. Don't fill the whole bed up with potting soil. The soil in your raised bed should be a mixture of native soil and organic matter like compost (Image 2). A 50/50 mix is good, or you could mix 25% sand with 25% compost and 50% native soil. Both of these are well-draining mixes that will also hold on to enough water for your plants. Be sure to blend the ingredients of your soil mix well. If you layer the different elements, it creates a barrier for plant roots. Pile the soil a little higher than you want to allow for settling.