Igneous rocks that are allowed to cool more slowly form larger crystals, while igneous rocks that cool quickly form smaller crystals. It is simply a matter of time. The longer it takes for magma to cool, the more time is allowed for the crystals to form.
The crystal size in igneous rock formations is directly related to the cooling time of the magma. Therefore, crystal size can be a dependable factor in determining the conditions with which the rock was formed. For example, rocks that feature larger crystals were more likely formed at lower levels below Earth's surface. This is because temperatures increase at lower levels under Earth's surface, while temperatures remain higher at high levels just beneath the surface. Rocks formed beneath lower levels are called intrusive rocks, while rocks that form at higher levels are referred to as extrusive. It is possible for rocks to exhibit both large and smaller crystals, meaning that the rock began forming at lower levels and then was abruptly forced upward closer to Earth's surface to cool more quickly. It is also possible for an igneous rock to not form any crystals at all, which can happen when magma cools extremely quickly. These crystal-less igneous rocks are referred to as having hyaline texture.