Weathering and erosion break down larger rocks into smaller pieces which are then transported by wind, water, or glaciers, these fragments settle and accumulate in layers and over time, these layers get compressed and cemented together to form the rock, minerals dissolved in water precipitate out of solution due to changes in temperature, pressure, or evaporation