The magnetic field of a permanent magnetic material destabilizes on its own over a long period of time, generally on the order of hundreds of years. Magnets, however, weaken more quickly when they are exposed to physical shocks, other magnetic or electrical fields, and high temperatures.
These conditions cause the atoms of the material, aligned with a polar north-south orientation, to disorganize, which weakens the magnetic field. Exposure to the large, weak magnetic field of the Earth also plays a destabilizing factor, reorienting the material to its own polarity. The rise of temperature exponentially degrades the magnetic field of a material; a sufficiently high temperature can destroy a field in a matter of minutes.