An electric locomotive runs on electricity as the name suggests. Electric locomotives cost the least to buy and operate. However, the railway electrification system is very expensive, so only tracks used by many trains per day are usually electrified. Thus, electrics are only the second next used type, behind diesel locomotives.
Electric locomotives get their power from three main sources: overhead lines, an on-board battery, or a third rail.
There are many different types of electric locomotives. Battery-electric locomotives are powered by on-board batteries. They are used in situations where other types of engines could be dangerous.