Although commonly called diesels, the locomotives actually are electrically driven. The diesel engine drives an alternator, which produces electricity to run electric motors mounted on the locomotive's axles.
People Also Ask
Diesels can still operate on electrified lines, they simply do not pull power from the overhead wires, instead burning diesel to generate power. There are no clearance problems for diesels to operate on electrified lines.
There's really no incentive for freight trains to put passenger cars on their lines since demand is lower than what they would need to make a profit. Amtrak occasionally puts freight cars on its passenger lines, but this is becoming rare.
It is absolutely not legal to ride on any part of a freight train without the express permission of the railroad. You would be guilty of trespassing and of theft of service since you would be getting railroad transportation without paying for it.