Gabbro forms when molten magma is trapped beneath the Earth's surface and slowly cools into a holocrystalline mass.