Ceramic magnets. The pickups look to have been back to back and one magnet has pulled the other away from the pickup when they were separated. You should be able to carefully twist the ‘top’ magnet to separate it and reposition it back on the other pickup. Make sure the same ‘face’ of the magnet goes back on the other pickup, so the polarity is correct for hum cancelling.