Sandstone is a sedimentary rock. It is a rock made of compacted sand. Sand is small grains of rocks and minerals (such as quartz and feldspar). These are the most common minerals in the Earth's crust.
Sandstone which is resistant to weathering is used for building in many countries. It can be a hard rock. For example, paving slabs can be made out of hard sandstone.
Sandstone forms in two stages. First, layers of sand accumulate as sediment, either from water or from air (as in a desert).
Then sand particles are compacted by pressure of overlying deposits, and cemented ('glued' together). The 'cement' is either calcite (calcium carbonate), quartz (silica), or clay. Iron oxide often makes sandstone a reddish colour.