This used to be sand and other sediment - that's why it is called sandstone - which is a type of sedimentary rock. Sedimentary rocks are formed when pieces of rock are eroded, or worn away ...