Most soils were originally created through the breaking down of the solid rock which, at one time, formed the earth. Lychen on rock surface Many things caused the rock to break down. This can cause large rocks to shatter into fragments. This leaves scope for simple plants like lychen, and more complex ones like moss to establish in the damp crevices. The plant roots also plunge deeper into the cracks forcing the rock further apart, and yet more water to accumulate.
Water is another weathering agent.
Fast flowing water in rivers and streams grinds rock to pebbles and fragments that become sand. It can also carry them for considerable distances. These grinding down processes have been going on for millions of years. It is no accident that some of the most productive soils in the world are associated with river valleys. Perhaps early soils were made up of gravel sized particles.