2. Sedimentary rocks are formed when sediments, such as sand, mud, and gravel, are compacted and cemented together. Examples include sandstone, limestone, and shale.
3. Metamorphic rocks are formed when existing rocks are changed by heat, pressure, or chemical reactions. Examples include marble, slate, and gneiss.