How does a train work?

From the pantograph to the traction motor: how  does a train work?

How does a train work?