Both extrusive and intrusive rocks are examples of igneous rocks. Extrusive rocks are formed when the molten magma present inside the earth's interior comes out onto the earth's surface, cools down and becomes solid on the earth's crust. These rocks have very fine grained structure. For example, basalt. When molten magma cools down and solidifies deep within the earth's crust, intrusive rocks are formed. Since they cool down slowly, they form large grains. Granite is an example of such a rock.