Stones have been used in construction for thousands of years in buildings all over the world. They are classified geologically based on their mode of formation as igneous, sedimentary, or metamorphic rocks. Igneous rocks form from cooling magma, sedimentary rocks form from compressed sediments, and metamorphic rocks form from changes to existing rocks. Stones are also classified chemically based on their dominant composition of silica, calcareous, or argillaceous minerals. Structurally, stones can occur as massive unstratified rocks, stratified layered rocks, or foliated banded rocks. Many historical structures were constructed of stone and it remains an important building material.