From a practical sense it's quite easy. The larger the aperture the narrower the area of focus. That's it, that was easy.
Of course it can get more complicated the deeper you want to go into the rabbit hole. For instance, the larger the aperture the smaller the f-stop. What? f/1.2 is much larger than f/22
OK, lets step back for a second and first talk about what DOF looks like and why anyone would really care. If you don't know what DOF is I'm 100% sure you've seen it numerous times.
|Example of narrow depth of field. Subject is focused, but everything else is blurred.|
When you see a photo or film where everything is in sharp focus from near to far, it is oftentimes referred to as, deep focus. The person standing in the foreground and the buildings and faraway mountains in the background are all in clear sharp focus - from here to infinity.
Shallow focus is the opposite of deep focus, and is also referred to as narrow depth of field. I'm sure you've seen shallow focus - when an element in the picture is sharp and focused, but everything in front or behind it is a soft blur. It's very similar to the way we see the world.
|Find the sharp focus area. Notice everything in front or behind it is blurred.|
Yes, good blur vs bad blur. Bokeh shmokeh, I say it's all subjective. And every lens has it's own bokeh look. Google "bokeh" if you really need to go any deeper.
Let's get back to the easy part - how to achieve, shallow focus or deep focus.
Remember what I said? The larger the aperture (larger hole) the narrower the area of focus. Aperture, also called iris, is the hole or opening through which light travels through the lens and onto the camera sensor.
Iris' can be opened or closed incrementally. The increments are measured in f-stops. The confusing part is that the larger the f-stop number the smaller the hole is. Typically, f/22 is the largest f-stop number you'll find on photo lenses, and it happens to be the smallest hole.
Are you confused yet? Because I'm getting confused just writing about it. OK, here comes the simple explanation:
|Aperture or iris.|
If you want everything to be in focus from here to infinity you have to close your aperture or iris to it's smallest hole - largest f-stop number.
Shit, why didn't I just come out and say that? I kinda did, fourth sentence - up above.
I hope I've explained it well enough; you can always Google it...