Sandstone is as its name says sand grains cemented together into solid stone. The grain size of sandstone is 1/16 to 2 mm in diameter.
Sandstone is made up mostly of quartz. There are two reasons for this. First quartz is one of the most abundant minerals on earth. Second is that quartz is very durable. It resists weathering and chemical change.
Silica, calcite, and iron oxides are the most common cementing minerals for sand stone. These minerals are deposited in the spaces between the sand grains by water.
Over the course of thousands or even millions of years the minerals fill up all of the spaces.
When iron is present in the cementing minerals the sandstone takes on a reddish color.Sedimentary Rock Examples