How Is Electricity Created? An electrical generator is a tool for converting mechanical energy into electrical energy. The process relies on the connection in between magnetism and electricity. Each time a wire or almost every other electrically conductive product moves throughout a magnetic field, an electric recent takes place while in the wire.