You dig the soil for three reasons: first, to improve aeration; second, to improve structure; third, to incorporate organic matter and fertilizers that add nutrients to the soil. Gardens that have been badly neglected will need to be cleared before they can be dug. Normally, on a very overgrown plot, a trimmer will be needed to cut down the vegetation or, if you have the energy, a cultivator can be used. Compost or recycle all the perennial weeds, making sure that all weed seeds are far from the garden. Then, dig the plot.
Generally, you must turn the soil over with added organic materials for this kind of job. It gives you the opportunity to add compost or fertilizer to the soil and ensures that the soil has been dug to a uniform level over the entire plot.
On less overgrown gardens, you can usually get away with a simple digging. In other words, turn the soil over with a spade or fork to a more shallow depth. Using a fork has the advantage that it does not chop up the roots of perennial weeds, which will re-sprout if you do not remove all the tiny root particles. But it has the disadvantage that you cannot physically move the soil from one place to another with a fork. On heavy clay soil you may find that a spade or cultivator is the only effective tool.
A more drastic form of digging is double digging. It is sometimes required on previously uncultivated land that has been fallow and overgrown with weeds for a long period of time. This entails digging down about 8 to 10 inches and really turning the soil thoroughly. Doubling up on organic matter in the form of planting mix or compost will truly enhance your efforts.