For landscape photography, one frequent goal is to get everything in focus from near to far. Creating the largest depth of field (DOF) possible. The hyperfocal distance is that focus point that creates the largest DOF that includes infinity for a given aperture with "acceptable" sharpness at all distances within the DOF.
DOF has two major determinants: focal length and subject distance. Focal length affects DOF in an inverse way. The shorter the focal length, the larger the DOF. Subject distance affects DOF in a direct way, the closer the subject the shallower the DOF. The further away the subject is, the larger the DOF will be.
In the days before Live View or EVFs (i.e. film and early digital), it wasn't possible to set focus to the hyperfocal distance at the time of capture. There were formulas one could use to try to set this focus distance and hope you got it right.
With modern digital cameras the process is much easier.
(1) Set your aperture. Good starting points are f/5.6, f/8, f/9, f/11. Depending on the lens, sharpness starts to degrade around f/8 secondary to diffraction. Apertures smaller than f/11 will degrade sharpness for pretty much any lens. "Good" lenses will be optimal at f/5.6 (or sometimes at even wider apertures). But you may not be able to create the DOF you want without stopping down further.
(2) Change to manual focus.
(3) Set focus to the minimum focus distance via the focus ring.
(4) Zoom in to an area at infinity either in Live View or with your EVF if your camera has this option. Zoom in to the highest magnification possible.
(5) Manually adjust your focus ring moving out towards infinity. Stop when the zoomed in area that is at infinity in LV or your EVF becomes sharp.
(6) Done. You are now at the hyperfocal distance for your aperture. In many situations you won't be at infinity focus. Which is great--more of the foreground will be in focus than if you had just manually placed focus at infinity. That's the whole point of this exercise! If shooting handheld, you can now change your composition at will knowing that objects in the background at infinity will be sharp and you have the largest DOF possible for your aperture. Just don't touch the focus ring or change the aperture!!
CAVEATS
The above is a good general way to easily get the largest DOF that includes infinity. But like many things in life, reality is sometimes a bit more complex and nuanced.
The above assumes a lens with a flat field regarding focus. Many, many lenses don't actually have a flat field of focus. Instead they have what is called field curvature. This means that as you move from the center to the edge of the frame, the area of focus can move forward or backwards. "Good" lenses minimize this. But it is very, very common in many, many lenses. Which is annoying. So you follow the above advice confident that you understand optics in a theoretical sense about what should happen regarding DOF, but your actual lens doesn't follow the rules and produce the images you expect. Sometimes focus in the corners jumps forward compared to the center. Sometimes it jumps backwards. Sometimes the zone of focus changes in the not-center but not-corner regions. There are all kinds of weird field curvature behaviors. Again, annoying and frustrating.
On one level, the best advice is to know your lens. Know if it has significant field curvature. If shooting on a tripod, set the hyperfocal distance as described above, but also look across the frame to see if everything important is in focus. Sometimes stopping down further than you initially intended can get all of the important stuff in focus. Or you may have to find the "happy medium" regarding aperture and where you place focus with your particular lens.
DOF has two major determinants: focal length and subject distance. Focal length affects DOF in an inverse way. The shorter the focal length, the larger the DOF. Subject distance affects DOF in a direct way, the closer the subject the shallower the DOF. The further away the subject is, the larger the DOF will be.
In the days before Live View or EVFs (i.e. film and early digital), it wasn't possible to set focus to the hyperfocal distance at the time of capture. There were formulas one could use to try to set this focus distance and hope you got it right.
With modern digital cameras the process is much easier.
(1) Set your aperture. Good starting points are f/5.6, f/8, f/9, f/11. Depending on the lens, sharpness starts to degrade around f/8 secondary to diffraction. Apertures smaller than f/11 will degrade sharpness for pretty much any lens. "Good" lenses will be optimal at f/5.6 (or sometimes at even wider apertures). But you may not be able to create the DOF you want without stopping down further.
(2) Change to manual focus.
(3) Set focus to the minimum focus distance via the focus ring.
(4) Zoom in to an area at infinity either in Live View or with your EVF if your camera has this option. Zoom in to the highest magnification possible.
(5) Manually adjust your focus ring moving out towards infinity. Stop when the zoomed in area that is at infinity in LV or your EVF becomes sharp.
(6) Done. You are now at the hyperfocal distance for your aperture. In many situations you won't be at infinity focus. Which is great--more of the foreground will be in focus than if you had just manually placed focus at infinity. That's the whole point of this exercise! If shooting handheld, you can now change your composition at will knowing that objects in the background at infinity will be sharp and you have the largest DOF possible for your aperture. Just don't touch the focus ring or change the aperture!!
CAVEATS
The above is a good general way to easily get the largest DOF that includes infinity. But like many things in life, reality is sometimes a bit more complex and nuanced.
The above assumes a lens with a flat field regarding focus. Many, many lenses don't actually have a flat field of focus. Instead they have what is called field curvature. This means that as you move from the center to the edge of the frame, the area of focus can move forward or backwards. "Good" lenses minimize this. But it is very, very common in many, many lenses. Which is annoying. So you follow the above advice confident that you understand optics in a theoretical sense about what should happen regarding DOF, but your actual lens doesn't follow the rules and produce the images you expect. Sometimes focus in the corners jumps forward compared to the center. Sometimes it jumps backwards. Sometimes the zone of focus changes in the not-center but not-corner regions. There are all kinds of weird field curvature behaviors. Again, annoying and frustrating.
On one level, the best advice is to know your lens. Know if it has significant field curvature. If shooting on a tripod, set the hyperfocal distance as described above, but also look across the frame to see if everything important is in focus. Sometimes stopping down further than you initially intended can get all of the important stuff in focus. Or you may have to find the "happy medium" regarding aperture and where you place focus with your particular lens.