The problem is, that energy is never free but always comes with a price.
You cannot create perpetual motion using magnets, and you cannot get out more energy than what was originally put in, and even then, there are always extra losses incurring.
In order to magnetize a magnet, energy needs to be put into it. This is done when a large current is pulsed through a coil in which the material to be magnetized sits. The result of this pulse of current, which contains a certain amount of energy that can be measured, is to enlarge the magnetic domains which are parallel with the magnetic field within the material being magnetized. What will cause the magnetic domains to shrink again? Three things:-
1. An increase in the temperature of the magnet.
2. An external demagnetising magnetic field.
3. Physically shaking or striking the magnet.
Each of these, as you can see, requires that energy be spent
(heat, magnetic field, motion). None of these allows for a way to capture energy released by the decrease in the overall magnetic field. ( Adiabatic cooling does capture some of the heat energy due to the overall magnetic domains becoming random, but it requires energy to be put into the material first.) Also, there are always energy losses in every circuit (in various forms of heat energy, sound energy, mechanical energy, chemical energy, electrical energy, etc).
A keyword often used by those who think they have found the secret to free energy is:
"over-unity. "
What they mean by this is that the ratio of the energy output to the energy input is greater than 1 (more energy comes out than goes in).
It sounds great, but the physics is poor. When making energy measurements, there are a number of errors that can be made, often unwittingly, that falsely indicate over-unity is possible. In reality, it isn't. I have also heard of a scheme that changes some of the matter into energy (using E=mc^2) by actually taking the copper atoms and converting them into energy. If that inventor is able to accomplish this, great. But, this would not fall into the "over-unit" group of inventions. A sun or a star is good at doing this. They have the advantage of high pressures and high temperatures and large mass.
Here's are great Websites which explain what is often neglected by those proposing free energy devices: