Let me paint a scenario for you... You are out doing some landscape photography and in the distance is an incredible looking mountain, but before you snap a shot you notice there is something beautiful right in front of you that you also want to include in your shot. You set up your camera, change your aperture to f/11.0+ and snap away to find the mountain as sharp as you hoped, but the subject in the foreground is out of focus. You then change your focus to the subject in front of you, but now the mountain is completely blurry.
That scenario happens quite often, but fortunately there is a fix for it besides merging two images with different focus points together. And that fix is called hyperfocal focusing.
Hyperfocal focusing relies on a hyperfocal distance which is a distance that places the furthest edge of your depth of field at infinity. If you were to focus at infinity, you would have a lot of wasted depth of field behind the most distant objects in your scene. Once infinity is included in your depth of field you don't need to go any further because there is no further to go, but your depth of field doesn't just go from your hyperfocal distance to infinity, it actually goes in front of your hyperfocal distance too.
The easiest way of understanding this is by finding your hyperfocal distance. Once you know it, divide it by 2 and you now have the closest point that will be in focus. This image should help you understand what I mean:
So the important question is, how do you find the hyperfocal distance? Fortunately there are a ton of online calculators to do this for you. Click the image below to be taken to a great online calculator from DOFMaster:
Quick Note: Hyperfocal Distance will give you acceptable sharpness at infinity. For me, I want better than acceptable so I will always find my Hyperfocal Distance and move it back a little to go just beyond infinity at the furthest edge of my depth of field.