These are rocks form due to cooling and solidifying of magma due to high pressure, increased temperature or by changing the composition of the existing rock. They can also be formed by crystallization. Crystallization result in a granular rock and the process occurs at different temperatures.
Pyroxene is typical example of a rock resulting from crystallization. It is formed when the mineral olivine crystallizes at 1200°C -1300°C and then reacts with silica in the magma as the temperature decreases to form pyroxene. The Bowen reaction series outlines the sequence at which minerals crystallize.