The most common carbonate minerals are calcite and dolomite with lesser amounts of aragonite, siderite and ankerite. There are many other carbonate minerals.
Ancient carbonates are mainly low magnesium calcite or dolomite.
Sea water is supersaturated with respect to low magnesium calcite and dolomite but these minerals do not precipitate due to kinetics. If less than 0.02 mm the particles are referred to as mud. In ancient rocks the carbonate mud is mainly low magnesium calcite but in recent deposits mud is mainly aragonite. Reefs maintain or develop a structure of positive relief during deposition. Almost all modern reefs occur in warm, shallow water free of clastic sediment.