When we take a look at the Hero (using the most traditional definition of the word) in Western storytelling, we come to the conclusion that they basically all belong to two archetypes.
Namely: King Arthur and Lancelot.
King Arthur brought civilization and stability to England by personally defeating evil ursurpers and pagan kingdoms. His Knights of the Round Table were the epitome of chivalry and rode all through the land, righting wrongs, protecting the innocent and furthering the glory of their liege and God. He belonged to civilization, was an integral part of it.
Lancelot was an outsider. He was born in Brittany, in the magical forest of Broceliande, and his mother was a nymph (clear evidence of Lancelot originally being a Celtic mythical hero or demi-god). He was not just the best knight, he was superhumanly strong and capable. Lancelot traveled to Camelot to offer his services to Arthur, and became the greatest Knight of the Round Table. But his background was very different from the world Arthur had made. Lancelot came from the other, magical world, but he thought that Arthur's civilization was worth defending and protecting.
Of course, Arthur and Lancelot fell out over Guinevere, and the resulting rift precipitated the destruction of Camelot and Arthur's utopia.
Okay, what does this have to do with screenwriting (apart from Arthurian Epics which aren't really in vogue right now)?
These two archetypal approaches to heroism can be found in just about any genre of film. And they still hold their power to this day. (Note: they don't have to be encountered together - they can appear and function separately just as well).
Consider Stagecoach: a small pocket of civilization (the stagecoach with its occupants) travels through a Chaos wilderland. They encounter danger at every turn - but luckily they also encounter the Ringo Kid (John Wayne), an outlaw (= someone not of civilization) who has the strengh and skills to get them through this magical land and protect them against its dangers (especially the bloodthirsty Native American tribes).
Consider Casablanca (a perfect example): Victor Lazlo (Paul Henreid) is a heroic resistance fighter who is instrumental in organizing the fight against the Nazis. Rick Blaine (aw come on, everyone knows who played that role) hides out in the wasteland, creating his little fiefdom and refusing to get involved in the struggle between Good and Evil because of his broken heart - but once that problem's taken care of, he rejoins the fight and helps Lazlo escape to freedom.
The example of Casablanca is quite important because it puts another aspect of the dichotomy between these two heroes in the spotlight : the Arthur figure has zero sex appeal. Victor Lazlo (a far more handsome man than Blaine) is a father, a teacher, an intellectual, a creature of spirit. Rick is dangerous, unpredictable, sexy, attractive on an animal level.
And this is a recurring aspect of the Lancelot character. Being part of the World of Chaos, Lancelot draws much of his power from it, and he also has some of its characteristics. The Lancelot hero is sexy (even if, like Dirty Harry, he's not looking for sex or love at all). The Lancelot hero has greater skills and abilities than the people of the civilized world. But the Lancelot hero is (usually) maladjusted in some way. He may like civilization, admire it, even become a part of it in some cases - but he'll never fit in completely. And in some cases (John Wayne in The Searchers, for instance) he'll leave once his job is done, belonging to the world of Chaos and Magic too much to ever adjust to the rules and laws which are necessary to keep civilization afloat.
Want more proof? Star Wars. Luke Skywalker is honourable, brave, gets a magic sword (a clear Excalibur-substitute), and personifies the Light Side of the Force (all that is good and noble in the Star Wars universe). He's also completely desexualized, especially in the second and the third film of the trilogy: the girl he sort of flirts with not only chooses his best friend over him but turns out to be his twin sister!
On the other hand, we have Han Solo: a smuggler and outlaw, selfish, with no high-blown moral standards except for loyalty to his friends - occassionally, a great pilot and clever rogue, at home in the dangerous galaxy of the Empire - and he shoots first. And he's the heartthrob of the trilogy.
Now, the King Arthur-type hero was far more prevalent in the first half of the twentieth century - the upright lawman, the incorruptible policeman, the heroic soldier embodying all that is best about his country. As time passed, the Lancelot archetype took over almost completely (all the rebellious cop, loners, maladjusted mavericks etc. we've been presented with). The big shift probably started with the beginning of the Bond series: here we have a perfect Lancelot figure who was as mean and dangerous as his foes (Bond's callous extermination of his enemies in Doctor No was very shocking at the time).
Another interesting aspect of the Lancelot hero is that he is usually not perfect, has major flaws which either need correcting or not - but it does make him far more of an effective candidate for a character arc.
The Arthur hero often starts out in a position of weakness (slave, poor farmer, orphan) and needs to learn a set of skills in order to fulfill his destiny, but characterwise he's usually pretty perfect to start with. He's the 'shining example' of a society, while the Lancelot is the 'bad boy with a heart of gold'. Since character arcs have become so important in screenwriting the last 40 years, it's no surprise that the Lancelot archetype has become dominant. Of course that's not the only reason - the big changes society underwent during the late 1960s - early 1970s, with their distrust of authority and the values of the previous generations, made a rebelling hero figure all the more attractive and believable.
Incidentally, Arthur's character arc only activates near the end of the Arthurian cycle, when Lancelot and Guinevere have become lovers, and Arthur is consumed by bitterness and jealousy towards them and turns into a tyrant instead of a good king - and then reclaims his heroic status as the story ends.
Even though Lancelot is the flavour of the past decennia, don't count Arthur out completely, though. It's still very much possible to make the Arthur archetype exciting and inspiring, though it's harder to pull off. But if you want proof:
A truly Arthurian hero of (fairly) recent times is none other than ST:TNG's Captain Jean-Luc Picard.
So, when you're developing your Hero - know which archetype you're using, play to its strengths - and be sure to play around with it to make it unique.