Answer:
So, heating a magnet disrupts the domain walls and it becomes easy for the magnetic domains, which are ordinarily lined up, to rotate and become misaligned. They are now less aligned and point in the opposite direction to their neighbors, causing a decrease in the magnetic field and loss of magnetism.