There are three basic types, Igneous, Metamorphic and Sedimentary. Igneous rock is formed when a large mass of molten material, usually magma, cools. Granite is the best known example. Metamorphic rock is rock whose character is changed when subjected to intense heat or pressure. Marble which, in its simplest form is limestone re-crystalised by heat is the best known example.
Slate is a semi-metamorphic rock.
The metamorphic rocks used in buildings can be hard and durable, evidenced by the fact that they can be polished. The most common building stones are sedimentary rocks which basicaly, can be broken down into sandstones and limestones. Both were originally formed as deposits of material, which accumulated in layers on the floors of seas and lakes, and on old land surfaces. There are huge variations in both. A good analogy for the horizontal beds, is a book laid flat, in which the pages are the beds, and the covers are the horizontal planes of weakness, usually formed by clay deposits, that occur in all sedimentary rocks, particularly sandstones.