The Lord Commander is a rank found in several of the Seven Kingdoms' institutions. It is a combination of "Lord", meaning that the person holding the title is of noble birth, or at the very least knighted, and "Commander", indicating a position of authority and leadership. The term may refer to:
The leader of the City Watch of the Seven Kingdoms' various cities is called a "Lord Commander" when of noble birth, or a "Commander" when not. Janos Slynt was merely a "Commander" due to his lack of noble birth, but was later elevated to the nobility as Lord of Harrenhal in gratitude for his service to King Joffrey in betraying Eddard Stark.
In contrast, the leader of the Kingsguard is always called "Lord Commander", though this might simply be because most knights tend to be noble-born. Even if a commoner is knighted for bravery on the battelfield but was not born noble - as was the case with Ser Duncan the Tall, who was born in the slums of Flea Bottom but later became Lord Commander - being knighted technically promotes a commoner into a "noble". Members of the Kingsguard are supposed to exclusively be knights, and thus even a common-born member such as Ser Duncan would be called "Lord" Commander on the grounds that he is at least a knight. The City Watch only runs into this difference because unlike the Kingsguard, non-knights and commoners can join it and rise to command positions.
Sandor Clegane's appointment to the Kingsguard was considered controversial because he wasn't even a knight, which was explicitly against the rules of the order. The Lannisters did offer to knight Sandor, but he simply refused, because he always considered allegedly honorable knights to be hypocrites. Ultimately, Sandor abandoned the Lannisters and the Kingsguard during the Battle of the Blackwater anyway.
Ser Loras Tyrell briefly served as Lord Commander of Renly Baratheon's Kingsguard until the group's disbandment following Renly's assassination.
Members of the Night's Watch officially abandon all previous allegiances when they take the oath to join the order, leaving no distinction between members who were formerly common-born or noble-born. The leader of the Night's Watch is therefore always called "Lord Commander", even if they were bastard-born or common-born, and were never "lords" in the first place. The Lord Commander frequently is of noble birth, but this is simply because nobles tend to receive better combat training from their castle's master-at-arms before they arrive at the Wall. As a result noble-born men who join the Watch tend to rise more quickly through the ranks to become officers, but this is just a general trend and not an official rule. Many bastard-born or even common-born members of the Watch have risen to command castle-garrisons along the Wall during its millennia-long history, and there are multiple historical examples of common-born men who were elected Lord Commander. Noble-born men who join the Watch are typically younger sons who would never have inherited their fathers' lands and titles, and were never the "Lord" of a castle and territory ("Lord" with a capital L: technically all members of the nobility are called "my lord" even though they are not a "Lord" of anything). Lord Commander Jeor Mormont was a very rare case, as he was the actual Lord of Bear Island and head of House Mormont before he voluntarily abdicated in order to join the Watch. Jeor did this because Northern Houses tend to have greater respect for the Night's Watch, and House Mormont in particular because their lands are so close to the Wall. However, Jeor Mormont was an exceptional case: a man gets what he earns at the Wall, regardless of his past, and most often the "Lord Commander" was never a "Lord", and frequently was never even noble-born.