Mesas are formed by weathering and differential erosion. The top layer of a mesa (the cap rock) is made of rock which is resistant to erosion, and could be sedimentary (e.g. sandstone) or igneous (e.g. a solidified basalt lava flow or a sill). The resistant rock at the top prevents the erosion of softer layers of rock below, leaving the softer rocks below the cap rock standing higher than the surrounding land.