Soil is created from the erosion of rocks by weather or mechanical processes. Over a very long time, the surface of the rock softens, decays and becomes soil.
The power of a river or a stream is enough to wear away rock over thousands of years. The erosion is hastened because water also carries gravel or sand that helps wear away the rock. Water that freezes in the cracks of rocks expands and forces the rock to break. The freeze-thaw cycle wears down rock to the point at which soil is created.
Glaciers scrape up rocks from the ground and grind them down as they move. The resulting soil is left behind when the glacier melts. Wind also blows sand and gravel against rock and wears it away into soil.
Newly deposited soil is not optimal for growing plants because it lacks nutrients. These nutrients must build up over time. They are deposited by plants, which have roots that further break up the soil. The decaying bodies of these plants form humus, which makes the soil fertile. Bacteria that help the plants decay also make the soil fertile.
The wastes and dead bodies of animals also enrich the soil. Earthworms, by burrowing through and digesting soil, also increase its productivity.