Though many substrates have been tried, the best without doubt is vermiculite. This is an inert mineral product made by heating the mineral mica, and it is widely used in horticulture. The main advantages of vermiculite are that it absorbs a great deal of water and slowly releases it; it resists fungus; and when it dries, it does not cake into a bricklike consistency (as potting soil does) or turn into dust (as peat moss does).
It also is cheap and easy to find. Buy only horticultural vermiculite and make sure the label specifies that no fertilizer has been added; vermiculite used in building insulation has been treated to prevent it from absorbing water. Note that perlite is not the same as vermiculite and is not recommended. (Perlite tends to absorb less water and holds it poorly; it also sometimes sticks to an animal and can block the mouth.)
You can mix the vermiculite and water in a separate container if you wish, but when you start to construct the terrarium, it is easier to just pour in about 2 inches (5 cm) of dry vermiculite and then add clean water while mixing the two. At some point you produce a substrate that is damp to the hand but does not release water when you squeeze it. This is what you want. If you have added too much water (too wet), you can add some vermiculite to counter it; if you have too much vermiculite (too dry), add a bit more water. You can easily go to 3 or even 4 inches (7.5 to10 cm) of substrate and not bother the tarantula.
For dedicated burrowers, vermiculite by itself often is not satisfactory, as the walls of a burrow will collapse. In such cases, it is best to use a mixture of about half potting soil and half vermiculite to give a firm burrowing substrate. Some species do better with more soil and less vermiculite, but be aware that potting soil can dry and become solid or dusty, either of which is not good for you or the tarantula. Any mix should have at least a quarter vermiculite.
If you wish, you can add a cup of sphagnum moss to the cage to ensure that there is a relatively wet spot in the cage for emergencies (which should not happen) or put some smooth aquarium gravel or pebbles in one area to reduce the humidity. Stay away from dirt from the garden; it dries to dust and often is contaminated with fertilizers and pesticides.