When the material is burned, the stored sunlight is released in usable form.
Nuclear reactions come from the fission of heavy metals. This is the source not only of nuclear power but also of geothermal energy, as the heat of the Earth's interior is about 80% due to nuclear reactions from heavy metals in the Earth's crust.
There are indeed sources of "free" energy: solar power and wind power. But solar and wind power, although free, do not come from nothing. They come from the sun, and in a very real sense are not "free," rather, the sun itself pays the price for them in its extravagant consumption of hydrogen for nuclear fusion. Magnets, unless powered by the wind (or some other energy source), do not serve this purpose. They do not provide free energy.
Hojo Motor Scam
If you do a search on-line for "free energy" or "magnet power" or "green energy" chances are you will find a link for an on-line marketer who offers the plans for the Hojo motor for around $50.
The ads prominently feature the three patents that Howard Johnson earned for his motor design, and make extravagant claims that for a few hundred dollars in materials and a few hours of time, you can produce enough energy to power your home forever, free of further cost.
You should not be fooled by these ads. To replicate Johnson's work would require an enormous amount of money and time, not just a few hundred dollars and a few hours, and even then you would have only an improved design for an electric motor, not a way to generate free energy forever.