Magma forms by partial melting of upper mantle and crust. Partial melt means that only a fraction of the available material forms a melt, and that the remainder stays solid. The partial melt rises because of its lower density and ascends through he crust.