A large enclosure isn't necessary, but an arboreal species will need a tall cage and a burrowing type will need appropriate substrate or hiding places. Generally, spiders should be housed one to a cage as they are not social.
For burrowing or terrestrial spiders, a rule of thumb is that the cage should be approximately 3 times the leg span long, and 2 times the leg span wide. The height should not be much more than the length of the spider - these spiders are heavy and if they climb and fall it can be dangerous, even fatal. 2.5 or 5 gallon aquariums work well. A larger tank is not better in this case, as tarantulas do not need a lot of extra space and a large tank may make prey harder to find. They do need to have a very secure lid, as they can be escape artists, but the lid must also allow adequate ventilation. On the bottom, a substrate of vermiculite, or vermiculite mixed with varying ratios of potting soil and/or peat should be provided, at least 2-4 inches deep to provide burrowing room and to hold moisture. Wood chips, especially cedar, should be avoided.
A place to hide should also be provided - a piece of cork bark works well, or a half hollow log (as available from pet stores), or half a clay flower pot on it's side.
The arboreal tarantulas need a cage that is taller to provide climbing room, with branches, twigs or some other structure on which the spider can construct it's web. A 10 gallon aquarium set on one end can work well for this purpose.
Tarantulas do not need bright lights, and in fact should be kept in a darker area of a room, where direct sunlight will not fall on the cage. Incandescent lights should not be used for heating as they could potentially dry out the tarantula. Heating strips or pads (available at pet stores for reptiles) can placed under a small part of the cage for heating needs. Most species of tarantula do fine somewhere between 75-85 F.
A shallow water dish can be provided. It needs to be very shallow to prevent drowning, and if there is any doubt some pebbles can be placed in the dish to give the spider something to climb out if necessary.
Appropriate temperatures and humidity must be maintained, but this is where the various species have different requirements. For tarantulas that do not require high humidity levels, a water dish (shallow) in the cage and misting once a week should be sufficient. For those that require higher humidity, more frequent misting will be necessary. In any case, temperature and humidity gauges should be used to monitor conditions. At the higher temperatures extra care must be taken to ensure adequate humidity levels. At the same time, excess humidity can encourage mold growth and should be avoided.
The cage should not need cleaning frequently - for spiders kept at a relatively low humidity level once year is likely enough (earlier if mold, fungus or mites are noticed). For those kept in a more humid environment, this will need to be done more often.