Yip its sedimentary rock desposited in an old lake as sediments, compressed into rock by the weight of overlying layers, and then finally thrust upwards thanks to the pressure of the Pacific plate crashing into the south American plate. Its the same forces that pushed up the whole Andes mountain range.

The last bit is water erosion that has profiled the layers like that, the harder layers being more resistant to this type of weathering.

__________________Dreaming of Dakar
-Everyone has a max speed, 90% of that max speed is much safer and easier, and if that 90% speed isn't fast enough at Dakar, you enter the snowball. - neduro