Weathering, either chemical or physical, causes large rocks to break into smaller pieces, particularly near the surface.
The smaller rocks weather into a fine layer of particles at the surface. Microorganisms decompose the remains the dead plants and animals and add humus to this layer making it nutrient rich.
Minerals and salts from deep within the ground are carried by water and contribute to the mineral profile of the soil.