I think you mean to ask about hyperfocal distance. For maximum depth of field use the smallest aperture (highest f-stop) and focus on a point one-third of the way into the scene (hyperfocal distance). Small apertures allow less light through, so use a slow shutter speed and a tripod. You can increase the ISO, allowing you to use a slightly faster shutter speed (possibly allowing you to hand-hold), but I highly recommend using the lowest ISO possible and a tripod or some other method of stabilizing the camera. You may also want to use a remote shutter release or the timer, and mirror-up (if your camera allows it).
When you do the above, much of the scene may still appear to be out of focus in the viewfinder, but that's because the lens aperture is always wide open at it's maximum size, and doesn't stop down until the shutter is released. So, what you see through the viewfinder is what the image would look like if you were to set the lens at its maximum aperture (lowest number f-stop). When using a different aperture setting, you could use the depth of field preview button (if your camera has one) or take the image, review it in the LCD, adjust your settings, then shoot again.