Soil is formed through the weathering of rock and organic materials. It has distinct layers called horizons that vary in composition. The top layer, the A horizon, contains decayed organic matter and provides nutrients for plant growth. The lower B horizon contains materials leached from the A horizon. The lowest C horizon consists of unconsolidated rock materials. Soil type depends on climate, parent material, rock type, time, and slope, resulting in different soil compositions suited for various environments.