Several things such can cause a magnet to become demagnetized.
Oxygen and moisture absorption, corrosion.
Magnet damage resulting from mishandling, impact, or excessive vibration.
Magnet wear from abrasive product types and/or high-tonnage lines.
Operating temperatures and thermal shock.
If you hit a magnet with a hammer it could lose it's magnetism if you don't break it into pieces.
Magnets can lose their domain alignment if struck with a hammer or heated to very high temperature.
The vibration to the atoms caused by the blow can cause the domains to randomly align.
It is also possible to demagnetize a magnet by hitting the ends of the magnet with a hammer, which will alter the order of the magnet.
Magnets should basically last for hundreds of years without losing magnetism.
A magnet may lose around 1 percent of it's magnetism over 100 years.
For example, it is estimated that a neodymium magnet loses approximately 5% of its magnetism every 100 years.
Magnetism is caused by motion of electrical charges.
The source of magnetism is the electric charges.
The movement of the electric charge causes magnetism. Substances are made from tiny atoms.
These atoms have protons, electrons and neutrons.
Every substance is made up of tiny units called atoms.
Each atom has electrons, particles that carry electric charges.
To become magnetized, another strongly magnetic substance must enter the magnetic field of an existing magnet.
Magnets can produce electricity.
Moving a magnet around a coil of wire, or moving a coil of wire around a magnet, pushes the electrons in the wire and creates an electrical current.
Electrical generators work through magnetism to create electricity.
Although the rotor and stator that has copper wire on it to create magnetism need a source of energy such as steam, gas engine etc to turn the rotor to make the electricity.
Whenever you bring coils and magnets together (in the proper orientation and moving with respect to each other), magic happens.
In this case, it is the Edisonian magic of lighting a light bulb.
Turning the crank rotates a coil inside of the large U-shaped magnets.
Electric generators work on the principle of electromagnetic induction.
A conductor coil (a copper coil tightly wound onto a metal core) is rotated rapidly between the poles of a horseshoe type magnet.
The magnetic field will interfere with the electrons in the conductor to induce a flow of electric current inside it.
Electromagnetic or magnetic induction is the production of an electromotive force across an electrical conductor in a changing magnetic field.
Michael Faraday is generally credited with the discovery of induction in 1831, and James Clerk Maxwell mathematically described it as Faraday's law of induction.
Today, electromagnetic induction is used to power many electrical devices.
One of the most widely known uses is in electrical generators (such as hydroelectric dams) where mechanical power is used to move a magnetic field past coils of wire to generate voltage.