Depth of Field is the amount of the image that is in focus. A shallow depth of field means that only a small amount of the image is in focus, while front to back sharpness is the complete sharpness of the image.
Focus stacking is the act of combining several exposures with different depths of field, to create a composite image with front to back sharpness. Of course, to do this, you need a tripod to ensure the camera remains still, as the images cannot be properly combined if they are not in alignment.
So when is focus stacking actually useful? If you are photographing a landscape with an object in the foreground, you can focus either on the object, or the landscape, as even using a small aperture will not be able to get both the object and the landscape in perfect focus. However, if you use focus stacking, you can get the best of both worlds!
So, you will need a tripod! Then, you need to head to the location, and take several photographs of the targeted subject (with a tripod!) using different exposure settings, and combine them in Photoshop.
When you get to the location, compose the shot, and set the aperture (try something like f11-16), and check the image in the histogram. Take a test shot, review it, and if you are happy, you are good to go!
To combine the images, open them in Photoshop, and go to File > Automate > Photomerge then select Auto, uncheck blend images together, and click the Add open Files button.
Select all the layers, go to Edit > Auto Blend Layers and select Stack Images. Click OK, and Photoshop will analyze each of the layers for sharpness, and combine them together using layer masks, showing the sharpest areas in the final image.
An example can be seen in the video below: