The study of ancient reefs requires a basic understanding of sedimentary rocks. Sedimentary rocks are one of the three basic rock types (metamorphic and igneous are the other two). They formed at or near the surface of the Earth often with the association of water or wind, have layers and commonly contain fossils. Most sedimentary rocks are deposited under water as layers, also called beds or strata. There are three basic types of sedimentary rocks:
1) Clastic sedimentary rocks form by the accumulation of sediment particles eroded from older rocks and they represent mud, sand or gravel that has hardened into rock.
Common examples: Sandstone, mudstone, shale, conglomerate
2) Carbonate sedimentary rocks, form when organic activity or inorganic precipitation extracts carbonate from seawater to form a sediment composed of calcium carbonate or calcium-magnesium carbonate.
Common examples: Limestone, dolostone
3) Chemical sedimentary rocks form as minerals dissolved in water precipitate out of solution. When salt water evaporates Halite (salt) and gypsum are deposited.
Common examples: Rock salt, rock gypsum, anhydrite, chert