Seafloor spreading is a part of the theory of plate tectonics.

At the Mid-Atlantic Ridge (and other places), material from the mantle rises through the faults between oceanic plates to form new crust as the plates move away from each other as a result of continental drift.

It is still a matter of some debate whether continental drift is driven primarily by the force of rising magma at these locations, or if it is driven by the force of sinking magma elsewhere and these upwellings are merely a side effect.