How Is Electricity Generated? An electrical generator is a tool for converting mechanical energy into electrical energy. The method is predicated on the relationship amongst magnetism and electricity. When a wire or almost every other electrically conductive materials moves throughout a magnetic industry, an electric latest occurs within the wire.