Sedimentary rocks are formed through the deposition and solidification of sediment. This process involves the accumulation of particles such as sand, mud, and organic material, which are then compacted and cemented together over time. As layers of sediment build up, the weight and pressure from above cause the lower layers to harden into rock. This process can occur in various environments such as rivers, lakes, oceans, and deserts. Petrified trees, on the other hand, refer to the fossilization process where organic material is replaced by minerals, resulting in a rock-like structure. Molten rock that has cooled refers to igneous rocks, not sedimentary rocks.