When this molten lava comes on the earth’s surface, it rapidly cols down and becomes soild. Rocks form, wed on such a way. On way on the are called extrusive igneous rocks. they have a very fone grained structure.
For example, basalt sometimes the molten magma cools down deep inside the earth’s crust. Solid rocks so formed are called intrusive igneous rocks. Since they cool down slowly they form large grains. Granite is an examples of such a rock.