|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.
 Igneous extrusive
In certain regions igneous extrusive layers replace sedimentary layers as the top-most layer of stone. Besides being made of different rocks, they are generally very 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 very rarely contains any flux.
Contains a small variety of vein ores, as well as marble, the one non-sedimentary flux. Metamorphic layers generally contain moderately valuable gems, and if the sedimentary layer (or and especially igneous extrusive layer) above contains no flux stone, it is a useful early target for exploration in the hopes of finding flux. It does lack weapon-quality ores (containing only copper and silver).
 Igneous intrusive
This is the deepest and often widest level, and leads directly into the magma sea. Gems here are generally the most valuable, on average. The most valuable of them all, colored diamonds, are found within faint yellow diamonds within kimberlite within gabbro layers.