Serious photographers have been asking this question since photography began. The answer goes like this –
Light passes through your lens and projects on your film or sensor. A tiny detail in a perfectly-focused image will converge to a point on the sensor. Details farther away or closer will project as circles. If those circles are small enough, they’ll look like points and appear sharp too. However, bigger circles will look like smeared blobs – not sharp.
It’s that range of sharp-looking small circles (with the sharp points in between) that forms your depth of field / depth of focus.
Larger-diameter lenses allow light to enter from a larger angle. They also project correspondingly bigger circles. Those circles still converge to points for in-focus details. But they’ll spread more quickly to out-of-focus circles farther away or closer, giving you less depth of field. That makes lenses like Leica’s huge 50mm f/1 Noctilux difficult to focus at the wide-open f/1 aperture.
Buzz at home, 50mm f/1 Noctilux at f/1
When you close down the lens aperture, you shrink the lens diameter, and shrink the projected circles of light on your sensor. Smaller circles look sharper, so you’ve increased what looks sharp farther away or closer.
What about wide-angle versus telephoto lenses? Don’t wides have more depth of field? A wide-angle lens takes in more of what’s in front of you. Far-away details project smaller out-of-focus circles on the sensor. So the wide-angle will appear to give greater depth of field from the same distance.
A telephoto lens takes in less of what’s in front of you. Far-away details project larger out-of-focus circles on the sensor, so the lens will seem to have less depth of field.
However, enlarging the wide-angle image to the same detail size as the telephoto image will show the same-size out-of-focus circles. So depth of field is a visual effect depending on distance from details in your image.
The only real way to increase depth of field is to close down your lens’ aperture. BUT if you’re not enlarging images beyond web-size JPEGs, viewers will never notice that far-away wide-angle details are unsharp.
I wrote this explanation after reading a review of Zeiss’ 25mm f/2.8 ZM lens, stating that depth of field differed on a full-frame M9 camera versus a cropped-frame M8.