|This article is about an older version of DF.|
There are four types of stone layers in Dwarf Fortress, very much based on real life geology. Stone layers are roughly homogeneous layers of rock that are composed of the same kind of stone, and usually contain different ores. Each stone layer has its distinct markers and qualities; sometimes a clear dividing line can be drawn between two biomes from the stone layers underneath, sometimes not. Digging deeper or digging into another local biome will reveal differences between contents and a progression from sedimentary down to igneous.
These changes are usually quite sharp; fifteen layers may be mostly quartzite, but the next thirty layers may be dominated by gabbro. Three dimensional variance is planned for the future, but for now, changes between stone layers also mark changes in ore and gem content.
Most maps have one or a few layers of soil at the very top, although this layer may be completely non-existent or ten or more layers deep as well. Note that on mountainous terrain, soil tends to accumulate near edges; thus you can have partial soil "layers" down the side of the mountain for quite a few z-levels.
Soil is important for three reasons: it is easily farmed (not requiring irrigation like stone does), it is easily mined (taking less time than stone), and it does not leave any loose stone behind when mined. Soil layers can contain clay and sand, if your biome has any, as well as a high chance of being an aquifer, if your biome has one. Soil layers do not contain ores or gems. At least one layer of soil is necessary to easily establish farming. It is not recommended you establish your main fortress in soil, as it cannot be smoothed or engraved to make it visually appealing/more valuable.
The sedimentary layer is the first stone layer that appears after any soil. It will include any lignite or bituminous coal, if you are lucky enough to have some. Iron ore and all but one of the fluxes is common here as well, making the sedimentary layer make-or-break for steel production. Note that this layer and the igneous extrusive are mutually exclusive, and will never be found in one place. Sedimentary layers are generally where the bulwark of the fortress will find itself, will contain most of the ores marked on the embark screen as "shallow metals", and is a good choice for exploratory mining. Note, however, that it is poor in gem content - those found in sedimentary layers are generally less valuable than those further down. Some types of sedimentary rock may contain an aquifer.
In certain regions, igneous extrusive layers replace the sedimentary layers, but when present are not limited to the top-most layers and can appear anywhere except the bottom-most layer. Although being made of different rocks, they are similar to sedimentary layers, with the exception being that they often indicate the presence of magma above the magma sea itself. This is always the top-most layer near volcanoes; the biggest stumbling block is that its presence means that the biome rarely contains any flux.
Can appear at any level except the bottom-most layer or above any sedimentary layer. Contains a small variety of vein ores, moderately valuable gems, and possibly can be marble, the one non-sedimentary flux stone. It does lack weapon-quality ores (containing only copper and silver).
Igneous intrusive layers can appear at any level except the top-most or above any sedimentary, and the deepest and often the thickest layer will always be igneous intrusive, just above the magma sea or semi-molten rock. Gems here are generally the most valuable, on average, with the most valuable of them all, colored diamonds, found in kimberlite in gabbro layers.