Metamorphic rocks, the third category of rock, are formed when existing rock is buried or heated, so that the minerals that make up the rock change. Sometimes this simply involves the formation of some new crystals. But it can involve the complete reorganising of the chemistry and fabric of the rock into bands of new minerals.
Metamorphic rocks do not occur naturally in Edinburgh, but one particular metamorphic rock, slate, has been brought to the city from the Highlands. It makes an ideal roofing material because it is water-resistant, and splits into thin sheets that are light but strong.