The rate at which the magma cools affects the size of the crystals that form. If it cools slowly, large crystals will form. If it cools rapidly, small crystals will form.
if it takes the rock a long time to cool down the crystals will be bigger if the rock takes a short time to cool the crystals will be smaller