Sedimentary rocks are formed from the compaction and cementation of sediments. The environment in which these rocks form is often indicated by the grain size and the shape of grains. For instance, if rock grains have been rounded, water (from a river/lake) has often softened the edges. Or if there are sharp edges, glacial ice may have roughly cut the particles that now make up the rock.
Most sedimentary rocks fall into two categories: clastic or chemical. Clastic sedimentary rocks are made of fragments of other rocks and minerals. Chemical sedimentary rocks form from the evaporation of solutions and/or the remains of once living organisms.