Lastly, connect your anchors using a heavy-duty string or twine, creating a grid-like pattern of planting squares. You can see an example of the results of this process in my garden bed here: Square Foot Planting Squares.
Then, determine what you would like to use for the anchors. If you built your garden bed out of lumber, you could use nails as anchors, spacing each nail the appropriate distance as determined by the results of the calculation in Step 1 above. If your garden bed is made out of a composite material (part wood waste, part plastic), I recommend using an anchor placed on the outside of the bed. Since my beds are 6 inches high, I used 12 inch metal spikes I bought from the local hardware store, pounding them into the soil directly on the outside of the garden bed.
You will have fewer problems with pests gardening in raised garden beds. If you have had previous problems with burrowing rodents, a lining of chicken wire in the bottom of each will eliminate them. Weed control is much easier handle because you can walk around a raised bed without having to bend over to pull out, if you have any weeds at all.
The spacing is such that when the vegetables are fully grown, their leaves just barely touch each other, creating a microclimate in which weed growth is suppressed and moisture is conserved. Raised beds produce a variety of benefits: they extend the planting season, they can reduce weeds if designed and planted properly, and they reduce the need to use poor native soil. Since the gardener does not walk on the raised beds, the soil is not compacted and the roots have an easier time growing.