Focus stacking is a technique used to increase depth of field in a shot with post production. This works especially well for shots using long lens and in this case, a macro lens. Let’s go back to some photography 101 here. There are three factors that will affect depth of field or ‘bokeh’:
1. Focal length. Essentially the longer your lens, the more shallow your depth of field is.
2. Distance to subject. The nearer you are to your subject, the shallower your depth of field is and it very much applies to macro lens.
3. Aperture settings. The more you open up the aperture of your lens, the resulting image has a shallower depth of field. This, however, does not matter as much where the photo above is concerned.
via An Introduction to Focus Stacking.