The process by which the magnetic field lines of adjacent magnetic domains come into contact and merge, releasing energy.