I'm not very well-versed on the subject, and it's VERY broad, but it seems that at some point we had knights and lords leading armies and fighting wars, and now we have NCOs and officers leading armies and fighting wars. Where did the change begin?
If I'm enlisting as a 68-series Healthcare Specialist in the United States Army, and rank up high enough, I'll become an NCO. Then I go to medical school and become an officer by commissioning - does this mean that, in effect, the U.S. Army would be knighting me?
Most Western countries seem to have Corporals/Caporals, Sergeants, Lieutenants and Captains and the like. Where do we get these names from?
While I cannot answer your initial question about the precise emergence of the officer-enlisted dichotomy of armed forces, as to the latter question (is commissioning analogous to knighting) the answer is "very loosely."
Commissioning does have a social class as well as military chain of command implication, as an officer is by law and custom a "gentleman" and supposed to comport himself accordingly, and ordinarily someone without (for want of a better word) "white collar" polish and education won't be commissioned.
It is important to note that by the time, and well before for that matter, of the foundation of the US military, "gentleman" had become a far broader social class designation in Great Britain and British America than that of the chivalry and nobility. Anyone who grew up with or obtained some money outside of the skilled trades was a gentleman. Knighthood and nobility (in its first creation) were rare and high political honors, and nobility in its inheritance of course lost the character of merit but stayed numerically rare.
Another question: why does it say there's two comments when there aren't any?
I've answered this before from the perspective of the Royal Navy, and perhaps this older answer may be of some interest to you. It covers the differences among enlisted men versus warrant and commissioned officers. There is not necessarily an unbroken line of development between then and now, but it's part of where we start to see the distinction between officers who have a commission from the King (or other government authority) and those who have a warrant from a government board or other entity. The warrant officers -- which in armies are usually referred to as "non-commissioned officers" or NCOs -- were originally people who bridged the gap between the professional knowledge needed to run a ship, and the (often unqualified) gentlemen appointed to command a ship. The British navy is unique in this time period in making commissioned officers professionals, by requiring an examination to prove competence.