Unfortunately, we do not possess any source that describes the specific process through which Spartan officers were selected and promoted. We do not know for certain whose responsibility it was to fill the posts in the hierarchy, or in what way a Spartiate could increase his chances of being selected. However, we know a great deal about the way that Spartan society was stratified in general, and this allows us to speculate about the selection of officers too.
In particular, the Spartans (like the rest of the Greek leisure class) cultivated an ethic of extreme competition. They valued rivalry between equals, insofar as it didn't split the citizen body, as a healthy way to get each citizen to commit himself fully to the community. From infancy, Spartiate boys (and girls) were encouraged to try to outdo each other in all the fields in which Spartan citizens were expected to excel. Their constant athletic competitions allowed Spartiates to show their strength and agility; their choral performances allowed the agile and musical to shine; their constant emphasis on self-denial, endurance and obedience allowed boys to make a name for themselves through conspicuous displays of "Spartan-ness". Several anecdotes preserved by later sources show the respect that was granted to those who proved the most "Spartan" - that is, those who most closely approached the way the Spartans liked to see themselves. J.E. Lendon has noted that strange acts like Amompharetos' refusal to follow his regent's orders and retreat at Plataia was probably the result of his desire to display an extreme of Spartan virtue - never to retreat - even it violated another Spartan virtue, absolute obedience to one's superiors.
The result of this general tendency to encourage competition at all ages was that Spartans grew up with countless opportunities to stand out from the herd. Once they reached adulthood, their efforts were recognised in the process of selecting young men to join the hippeis, the Spartan royal bodyguard. According to Xenophon, the ephors picked 3 of the best of the young men, who were tasked with picking 100 each, and offering explicit reasons why one was chosen and another was not. This was the moment when, presumably, all a boy's achievements were laid out before the community, and peer rivalry reached a fever pitch; Xenophon says that this was a stage in life at which boys got into fights whenever they met, eager as they were to prove that they were actually braver and stronger than those who had been selected.
We can see how this culture of competition for honour, where the areas in which to excel overlapped neatly with behaviour that was useful in battle, would also highlight to the Spartan authorities who might have the potential to become an officer.
As I said, we don't know who was in charge of making the selection. The ephors themselves, and the members of the gerousia (council of elders), were elected by the Assembly of all Spartan citizens; it is possible that the Assembly also elected new officers when needed. On the other hand, like the men who were to select the royal bodyguard, it is possible that they were hand-picked by the ephors, who had significant power over the running of Spartan society. A third possibility is that the responsibility of selecting junior officers rested with their superiors - that the king selected the polemarchs, who selected the lochagoi, who selected the pentekostyes, and so on down the hierarchy. A lot of slots needed to be filled - Thucydides notes that nearly the entire front rank of a Spartan phalanx consisted of men who had the command over at least some others - and it's possible that the choice was often left to the unit commander.
In this process, another very important factor came into play: sheer favouritism. We know that social status was extremely important in Sparta, regardless of their claim that their full citizens were "the same" (homoioi). Those who had family ties to royal houses, or those who were junior partners in pederastic relationships with prominent Spartiates, had a much easier time rising through the ranks. The sons and "foster-brothers" (adopted non-Spartiates who went through the agoge alongside full citizens) of those on the gerousia doubtless had similar advantages. We know, for example, that Sphodrias retained a prominent role in the Spartan army even after his disastrous raid in 378 BC provoked a war with Athens, primarily because his son was the beloved of king Agesilaos' son. Such elite ties probably greatly increased a man's chances of being selected for an officer's position, and to be promoted to a higher one. Again, we don't know exactly how the process worked, but these two aspects of Spartan society make it possible to speculate with some degree of confidence.
As to your other question, yes, absolutely. All Spartan commanders and kings led from the front and were personally involved in hoplite combat. Leadership by example was essential to the relatively primitive Greek way of war; troops who did not trust their general to share in the danger would not be motivated to fight. We know, of course, of several Spartan kings who died in battle (Leonidas at Thermopylai; Kleombrotos at Leuktra). We also know of numerous non-royal Spartan commanders who fell fighting. Perhaps the most epic example is the Boromir-like death of king Agis II in the aftermath of the battle of Megalopolis in 331:
He had fought gloriously and fell with many frontal wounds. As he was being carried by his soldiers back to Sparta, he found himself surrounded by the enemy. Despairing of his own life, he ordered the rest to make their escape with all speed and to save themselves for the service of their country, but he himself took up his arms and, rising to his knees, defended himself, killed some of the enemy and was himself slain by a javelin. He had reigned nine years.
-- Diodoros 17.63.4