okay here is my answer and explanation
The process of mineral formation from magma is called crystallization. Molten rock has a specific chemical composition, which determines what minerals crystallize when the molten rock cools. Magma cools slowly underground, which allows large mineral crystals to grow.