The interaction between moving electrons and magnetic fields can produce electricity. If a metallic wire that is part of a complete circuit is passed through a magnetic field, the interaction between the electrons in the wire and the magnetic field causes a force on the electrons which pushes them through the wire. Those electrons moving in the wire is an electric current.
A machine designed to pass metal wires through a magnetic field and thus generate electricity is called an electrical generator. All that is required is to spin the axle on the generator. A large machine containing fan blades that will spin when fluid is forced through the blades is called a turbine. When an electrical generator is attached to a turbine and the turbine spins, electricity is generated. The turbine can be spun by wind blowing through a windmill, or by steam produced from burning coal, or steam produced from a nuclear reactor. The turbine can also be spun by allowing water falling from a dam to pass through the turbine. When falling water is used to spin the turbine, the electricity is called a hydroelectric power.
Hoover Dam near Las Vegas is shown in the photo above. Millions of gallons of water flow from the top of Hoover Dam and generate about 4 billion kilowatt-hours of hydroelectric power each year for use in Nevada, Arizona, and California.
Magnets can be temporary or permanent, depending on their ability to retain charge when not in contact with another magnet. Ferromagnetic materials are substances which can be made into magnets. A ferromagnetic core wrapped with a current-carrying wire forms an electromagnet that may be many times stronger than the magnet alone.
Magnets emit fields of magnetism, and passing a wire connected to a complete circuit through such fields induces current through the circuit. This is the basic premise behind electrical generators, effectively converting the mechanical energy of the motion of the wire into electrical energy.