Any discussion of garden soil starts with some basic geology. Soil includes rock that has been worn down into mineral particles of various sizes. Imagine your garden as a pile of boulders. Now imagine wind and water wearing away at those boulders over a very, very long time--until, eventually, they become the soil in which your plants are growing today.
Though soil may have started out as solid rock, it's usually relatively easy to work by the time we put a shovel to it. That's due both to the small size of the mineral particles and to the air and water contained in the pore spaces between them. In fact, a shovelful of soil is only about half mineral particles; the other half is almost equally divided between air and water. Only a very small amount is organic matter (decaying plant material, for example).
Besides minerals, air, and water, your garden soil comes complete with living creatures. The most visible one is the familiar earthworm--but besides a few hundred of these, the top several inches of a square yard of soil may include a million mites and mitelike creatures and over 10 million nematodes and protozoans. These creatures all help keep the soil healthy. They process minerals to make them available to plant roots; they keep harmful fungi under control. Their waste products (and later on, their remains) form humus, a soft, blackish brown material that improves the structure of any soil.
Because most of these creatures live in the upper few inches of soil, their habitat is destroyed if this layer has been scraped away (during the construction of a new home, for example) or is constantly worked. If you're starting out with poor or depleted soil, keep in mind that you will need at least a few years to revive it. Part of what happens during this time is that colonies of soil-dwelling organisms become established and begin to flourish.