There are a few factors that have an effect on the depth of field.
The two you have the most control over are:
1) The aperture of lens. The higher the F stop number (the smaller the size of the iris) the greater the depth of field.
2) The distance on which the lens is focused on. The further away you are with any given lens, the greater the depth of field. The depth of field is also not symmetric about the exact point of focus. It extends further behind the point of focus than in front of it.
And the last thing you may or may not have much control over, is the focal length of the lens itself. A long focal length lens (telephoto) will have a shallower depth of focus at the same F stop than a short (wide) lens. If you have a zoom lens, it will have a wider depth of focus at the widest setting.
One thing that indirectly touches this is the amount of light. Each click on the F stop ring lets double of half as much light in as the one before it. Each click of the shutter speed knob has the same effect. You can than trade the aperture for the shutter speed. A slower shutter speed will let you use a smaller aperture.
So, for the deepest depth of focus:
* as much light as you can get
* the slowest shutter speed you can handle
* the smallest aperture you can use
* the widest lens setting you can use
One easy way to remember this is to think of a cheep old film instamatic camera that had no controls on it.
Have a slow shutter speed, about 1/125 of a second or so, to minimize blur from shaky hands
Have a relativity small aperture to help with the depth of field (no focusing remember! Depth of field needs to deep)
Have a relativity wide focal length lens - things always seem much further away than they are.
They generally give a pretty clear image from about 10 feet to infinity. With no controls and no adjustments.