Olmo and Alfredo represent two classes that grow together, facing in their own way the changes in society
The goal of Bertolucci is clear: using the two guys, who are the protagonists of the film, he wants to show the superiority of the working class compared to that one of the aristocracies and the bourgeoisie
Olmo and Alfredo they grow together as friends/enemies but it is clear that Alfredo always tries to be at the level of Olmo without succeeding.
The train event is more than a challenge of courage: the train symbolizes progress, the modernity that will transform the social structure.
Escaping from the tracks, Alfredo shows his fear of change, while Olmo, lying on the tracks, proves to be ready for the new era.
The train represents social change brought by progress