For most plants you'll want a bed in a full sun (or relatively full sun) as you can get. It should also be near a water source and not too wide where you'll have to walk on it to reach plants in the middle of the bed. If you do want a wide bed I suggest putting path of stone or mulch down the middle. It should be wide enough to walk and work and yet able to reach the garden portion on either side.
The sides of the bed can be constructed of wood, concrete, stone, plastic, composite or various metal options. It all depends on how much you want to spend and how long you want your raised bed to last. Cinder blocks, for example, are a good choice if you want to top them off to have a place to sit on the sides of your raised bed. Do not use treated wood — some treatments use chemicals you don't want on your plants if you're growing edibles, like arsenic. And even if it's a flower raised bed you're building you don't want that possibly leeching into your soil and the community water table. For the same reasons don't ever use used railroad ties, many of these have been treated with creosote.
I have used cedar, which is relatively long lasting, but more expensive than other woods. This year I went with white pine. Yes, it's a soft wood and won't last as long as many other options, but it's cheap, environmental friendly and easy to work. I bought enough wood to build a pair of 10 feet by 10 feet beds 10 inches deep for under $70, not counting compost and soil. More on that later.
I chose 10 inches this time because I'm building a bed to go around very large potted blueberry plants, so I wanted it higher than the typical eight inch bed. I also have a 12-inch deep bed that I've used for sweet potatoes and deep rooted plants. Remember this: the deeper the bed the more you're going to water. You don't want a 12-inch bed in a drought year like we just had unless your water bill isn't a concern. Raised beds are easier to work and easier to maintain the right mix of soil, but they do dry out faster and need more water than in the ground garden beds. Corner brackets can be used, and they're inexpensive and provide more support than if you use only nails. I've done both and will go with nails on eight inch boards or narrower. Five or six nails per corner provides more than enough holding power.
As for soil there are several ways to do it. Once I pick my spot I might put down a layer of black plastic to block the sun for a few weeks. This will heat the soil and kill all the weeds, pests and grasses. I then remove the plastic and put down a four inch layer of garden mix, followed by an inch of topsoil and then an inch of organic compost. Some gardeners prefer to till in the compost. I like to lay the compost on top and let it soak in the garden the way Mother Nature does it. After I seed the bed and/or put my transplants in I'll top it off with a layer of straw or mulch.
The pine likely won't last more than four or five years before it needs to be replaced but I'll gladly pay that price for less wear and tear on the knees.
You can also buy kits, which are even easier if more costly than gathering the materials at your nearby lumber yard or hardware store.