In the ocean basins, magmas are not likely to come from melting of the oceanic crust, since most magmas erupted in the ocean basins are basaltic. In the continents, both basaltic and rhyolitic magmas are erupted and intruded. Basaltic magmas must come from the underlying mantle. Thus, with the exception of the continents, magmas are most likely to originate in the mantle from melting of mantle peridotite. Again, magmas do not form everywhere beneath the surface, so special circumstances are necessary.
Temperature varies with depth or pressure in the Earth along the geothermal gradient.
The normal geothermal gradient is somewhat higher beneath the oceans than beneath the continents, at least at shallow levels. If we compare the normal geothermal gradients with the experimentally determined phase diagram for peridotite containing little water or carbon dioxide, we find that the peridotite solidus temperature is everywhere higher than the normal geothermal gradients. Thus, under normal conditions the mantle is solid, as we would suspect from the seismic evidence. Thus, in order to generate a melt, either we must find a way to increase the geothermal gradient so that it is above the peridotite solidus or reduce the temperature of the peridotite solidus. In either case note that all we have to do is get the temperature in some part of the Earth, as expressed by the geothermal gradient, into the field of partial melt.