It works by using electromagnetic induction. Pretty much only Faraday's Law but with an electromagnet. Also this technique is used in charging high-end toothbrushes and Splashpower Devices.
Step 1: Get the materials
1. Lots of wire. I used 18 guage wire.
2. A piece of steel that your going to wrap wire around.
3. A capacitor, one with high capacitance.
4. A diode.
5. Batteries, I used 6 nine volts.
6. A multimeter so you can see if everything works.
7. And something to make it a little easier, Alligator clips.