How Is Electricity Generated? An electric generator is a tool for converting mechanical energy into electrical energy. The procedure is based on the relationship concerning magnetism and electricity. When a wire or almost every other electrically conductive material moves across a magnetic subject, an electric recent takes place during the wire. T