In the early days of Hollywood, at the Academy awards, the Academy members could choose whether they thought an actor’s performance was leading or supporting.
This led to an interesting scenario in 1945, where an actor was nominated for the leading and supporting Oscars for the exact same role (Going My Way).
After this the Academy changed the rulings and studios were given a much larger part in the process. Studios now give their opinions as to which actor in the movie is the lead, which is supporting, etc. Studios can also take into consideration things like competition and choose the actor most “likely” to win in a particular category.
A great example of this is Kate Winslet in (The Reader), where she won a Golden Globe for Supporting Actress and an Oscar for Leading Actress.
So from the Academy Awards side of it, it is largely down to the studio.
As to outside of the Academy Awards and looking just at Hollywood in general, other factors can come into consideration such as the fame of the star.
In the movie you cited, Rush, there were two potential leads – Helmsworth and Bruhl. But Helmsworth would arguably be the bigger box office draw. He’s a good looking man, he’s starred in the big block buster movies Thor and Avengers and thus the studio may have felt he would be a better fit for the Leading Role as he would be easier to promote and market.
This article is also a fascinating read: Why Names Rarely Match Up With Faces on Movie Posters.
To summarise its contents, it effectively discusses how some actors end up fighting quite bitterly over who gets “top billing” for a movie. An example they give is The Towering Inferno, where it was decided on all the movie posters that Paul Newman’s name would be “highest” on the photo, but Steve McQueen’s name would be the most “left” (as most people read posters either top to bottom or left to right). This way, they both could be promoted as leads: