Normally, by making things spin. If you have a toy with a pull string at home, it’s basically the same thing. For example, with coal and nuclear fission we heat up water, making steam, which turns turbines. These power generators, producing electricity.
Then you have things like solar panels, which work by moving and releasing electrons around inside their atoms (electric current is just electrons moving!).
Comments