It is never made clear. The best we know from the books is that they (as a sub-race) are faster, smarter, stronger and larger than normal orcs.
Treebeard speculates that they were once Men or a hybrid between Orc and Man.
[Saruman] has taken up with foul folk, with the Orcs. Brm, hoom! Worse than that: he has been doing something to them; something dangerous. For these Isengarders are more like wicked Men. It is a mark of evil things that came in the Great Darkness that they cannot abide the Sun; but Saruman's Orcs can endure it, even if they hate it. I wonder what he has done? Are they Men he has ruined, or has he blended the races of Orcs and Men? That would be a black evil!'
The Two Towers: Book III - Chapter 4: Treebeard
Tolkien later reiterated the fact that Uruk-hai were greater than the other Orcs.
Related, no doubt, was the word uruk of the Black Speech, though this
was applied as a rule only to the great soldier-orcs that at this time issued from Mordor and Isengard.
Appendix F: Of Other Races
(bold emphisis mine)
That is all Tolkien writes on the creation of the Uruk-hai. We know they are better than normal Orcs and both Mordor and Isengard created some. Basically all that we see in The Two Towers (2002) is a creative liberty. Though, to be clear, there are commanders in the books.
'Not our orders!' said one of the earlier voices. 'We have come all the way from the Mines to kill, and avenge our folk. I wish to kill, and then go back north.'
'Then you can wish again,' said the growling voice. 'I am Uglúk. I command. I return to Isengard by the shortest road.'
The Two Towers: Book III - Chapter 3: The Uruk-Hai
(bold emphisis mine)
That said, given what we know about the Uruk-hai, it can fairly safely assumed that they all had leadership potential (similar to a "normal" soldier in the US Marines or Israeli Special Forces), but the best of them became the commanders. Unfortunately we are never told how said commanders were chosen.