All generators use magnetism. So that is not a useful question. Methinks you have some particular thing in mind.
You can actually extract energy out of the air... from the various radio waves etc. But it isn't a lot of juice but it could help charge up a battery. There is nothing magical about doing that. It's just basic science to the educated and nothing magical.
All you need is an antenna.. a piece of wire will work. Lower frequencies generate more power so you should work in the radio frequency spectrum. You need a diode and a capacitor and likely a transformer and a battery. That's about it. The old fashioned crystal radio was drawing energy out of the air and using it to power the headset.