We hear about Macbeth before we ever meet him in William Shakespeare's Macbeth. A messenger from the battlefield reports the happenings of the battle to King Duncan, and this is where we learn of Macbeth's brave deeds as he fights for Scotland and his king.
The messenger reports that the battle was at a bit of a stalemate until Macbeth spies Macdonwald, leader of the enemy forces, and rushes toward him.
For brave Macbeth--well he deserves that name--
Disdaining fortune, with his brandish'd steel,
Which smoked with bloody execution,
Like valour's minion carved out his passage
Till he faced the slave;
Which ne'er shook hands, nor bade farewell to him,
Till he unseam'd him from the nave to the chaps,
And fix'd his head upon our battlements.
This rash and brave act (and one which requires a tremendous amount of strength, as well) encourages his fellow soldiers, turning the tide of the battle and ultimately results in a victory for Duncan. During the battle, Macbeth defeats Macdonwald, the entire Norwegian army, and of course the treacherous traitor, the Thane of Cowdor.
To reward Macbeth for his courage in battle, Duncan names Macbeth the Thane of Cowdor and determines to come to Macbeth's house for a visit. Both of those decisions, though well intended, will prove to be deadly for Duncan.