Sedimentary rock formation begins with igneous, metamorphic, or other sedimentary rocks. When these rocks are exposed at the earth’s surface they begin the long slow but relentless process of becoming sedimentary rock.
Weathering
All rocks are subject to weathering. Weathering is anything that breaks the rocks into smaller pieces or sediments. This can happen by the forces of like wind, rain, and freezing water.
Deposition
The sediments that form from these actions are often carried to other places by the wind, running water, and gravity. As these forces lose energy the sediments settle out of the air or water. As the settling takes place the rock fragments are graded by size. The larger heavier pieces settle out first. The smallest fragments travel farther and settle out last. This process of settling out is called deposition.
Erosion
The combination of weathering and movement of the resulting sediments is called erosion.
Lithification
Lithification is the changing of sediments into rock. There are two processes involved in this change. They are compaction and cementation.
Compaction
Compaction occurs after the sediments have been deposited. The weight of the sediments squeezes the particles together. As more and more sediments are deposited the weight on the sediments below increases. Waterborne sediments become so tightly squeezed together that most of the water is pushed out. Cementation happens as dissolved minerals become deposited in the spaces between the sediments. These minerals act as glue or cement to bind the sediments together.
The process of sedimentary rock formation takes millions of years to complete only to begin a new cycle of rock formation.
Source: https://www.rocksandminerals4u.com/sedimentary_rock_formation.html