The three main factors affecting the formation of magma are temperature, pressure and composition. Magma has a temperature of 700 to 1300 degrees Celsius. A specific temperature and pressure is required for formation of a particular type of magma.
At a lower temperature, the lava materials solidify and magma does not form. A sudden drop in pressure can cause melting of the magma materials. Magma is composed of different types of materials with varying melting points. The composition is important because the presence of water, carbon dioxide and volatile components can reduce the temperature required for melting and cause a faster formation of magma.