Table Mountain and its little brother, Lion’s Head, began to form 800 million years ago at the bottom of the ocean when sediments and ocean deposits began to form a continental shelf made of shale.
Around 600 million years ago, hot magma intruded into this shale and slowly cooled to form granite.
Underwater, the shales were eroded away but, from 450 million years ago, sediments from rivers created layers of sand on top of the granite and shale. These layers were compressed and cemented together forming the sandstone known today as 'the Cape Supergroup'.
Around 300 million years ago, during the Carboniferous period, the Earth experienced consecutive cool and warm periods, wherein great sheets of glacial ice, thousands of feet thick, accumulated, then melted, then reaccumulated in synchronous cycles. These ice sheets flattened the layers of sandstone.
At this time, Africa was at the heart of Pangea, a vast supercontinent from which the continents we can see nowadays on the map originated. When the continents split apart, stresses and pressures built up in the earth's crust. If the rocks of Table Mountain and Lion’s Head had been made only of sandstone, they would have folded under the pressure, but the granite was strong enough to deflect the forces down. Slowly, this process forced the layers of rock to rise, slowly shaping the landscape we see today.
Throughout history, the sandstone has slowly suffered the actions of wind and rain, which patiently molded and carved caves into it.
Sandstone caves are usually small and shallow and there is not much to explore inside them, however, the hike to get to them can be its own reward.
References:
[1] Christopher R. Scotese, 2009, Climate and the Carboniferous Period
online: http://www.geocraft.com/WVFossils/Carboniferous_climate.html
[2] www.capetown.at.co.za, 2008
online: http://www.capetown.at/heritage/history/prehistory_geo_geol_art.htm
online: http://www.capetown.at/heritage/history/prehistory_geo.htm
[3] Cape Town - official tourism website, 2015
online: http://www.capetown.travel/activities/entry/lions_head
[4] Terry Shurts, 2008-2014, Adventure-Caves.Com
online: http://www.adventure-caves.com/sandstone_caves.html
Additional information:
I. Department of Geological Sciences, UCT, Cape Town Geology
online: http://www.geology.uct.ac.za/cape/town/geology
II. Highly Allochthonous, More Capetonian geology
online: http://all-geo.org/highlyallochthonous/2008/11/more-capetonian-geology/
all sources last accessed on 22.01.2015