As you increase the distance of the lens from the sensor by using extension tubes you affect the lens properties. The maximum focusing and minimum focusing distance both decrease; the intent being that by doing so you can focus closer than you could otherwise do with the lens.
Most commonly this is used for macro photography.
However as a result of this the closer you get to your subject the smaller your depth of field (at the same aperture) will be. So its a trade off; if you want to get closer and more magnified photos you have to sacrifice your depth of field. Now there are several ways to help overcome this loss of depth of field, including:
1) Using a smaller aperture (remembering that sharpness will degrade after around f8-10 on a lens and whilst it will remain very usable for a while, after around f16 or so the image degradation will become more and more noticeable).
2) Focus stacking (taking a series of photos at different points of focus and blending them into a single photo that combines all the in-focus parts)
3) Tilt shift - this shifts the plane of focus, so whilst the depth of field is the same the plane itself might cover more of the subject area you want in focus.
So if you want the maximum depth of field you have to use the least amount of extension tubes to get you the magnification you want.