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. Transformers transfer the voltage from the lines, and the electrical current drives the motors (AC or DC) on the wheels.