Magma formation is the process by which solid rock in the Earth's mantle or crust melts to form molten rock, primarily due to changes in temperature, pressure, or the addition of volatiles. This process is critical for understanding volcanic activity, the creation of new crust, and the cycling of materials within the Earth.