This happens trough the process of exfoliation. And the temperature changes are called thermal stress weathering.
Hope this helps.
9.5m questions
12.2m answers