Locomotive is rail vehicle which hauls passenger or freight wagons. Today we have electric, diesel and diesel electric locomotives.
Diesel locomotives
Diesel locomotives use diesel fuel. They usualy haul heavy freight trains or passanger wagons in places where we don't have electric power. Diesel-electric locomotives have diesel and electric engine. Diesel engine runs electric generator which one produce electric power for electric engines. That si more useful then just diesel engine. Onli diesel engines we use for smaller maneuvering locomotives.
Electric locomotives
Electric locomotives use electrical power. For that we must have electrified railroad. That locomotives have pantograph on the roof, usuali two on one locomotive. With pantograph, loco taking electric power from wires, and send that power over transformer to the electric engine under the loco. MORE


GP 9 Diesel-electric locomotive
Diesel loco for maneuvering (DB)


Siemens Taurus (Slovenske železnice & OBB)