The two ways minerals form is by:Crystallization of Magma, it cools inside the crust or lava cools and
hardens on the surface.Crystallization of Materials, it is dissolved in
water and the rate at which magma cools slows the cooling processes which leads to the
formation of large crystals.
Does that help you?
I hope it did:D