Many trains intersperse multiple locomotives throughout their lineup to increase and distribute the power. Besides steam- and diesel-powered locomotives, many modern trains operate solely on electrical power. They get the electricity from a third rail, or electrical line, along the track.