Focus stacking is a powerful method to extend depth of field by taking a series of images at different focal plane and use computer software to pick the sharpest part of each image for the final result. One way to acquire such series of images is by moving the camera towards or away from the subject (or by moving subject towards or away from the camera) so that different part of the subject will be in focus in each image. Then by applying computer algorithm, these images will be combined into one sharp image.
In order to move the camera (or the subject for that matter) and automate the process of image captures, an automated rail system is preferred method. However, current products on the market are extremely expensive and many macro photographers have to do it manually which is a tedious work to do. Besides expensive rail system, good stacking software are either expensive (but really good) or difficult to use (though free).