On a more historic basis, as if you want this for a fantasy name you may want more on the origins:
Officers traditionally represent the governing classes exercising their fuedal right to command and leadership. Regardless of the particular circumstances of their promotion they are expected to behave as gentlemen. Officer rank may or may not be assumed to require indepdent wealth, ie: You can't live off of your pay alone, and so you have to be already rich. The situation becomes more difficult if you have to buy your rank.
Enlisted men (though the term didn't exist) would usually be the poor, either volunteered, conscripted or pressed. Rising to officer status might be difficult, or even impossible. In some sitiuations, such as pre-revolutionary France, you could not be an officer unless you were a noble (they had a very large pool of nobles though). A lot depends on national and service culture and whether commissions are purchased or granted
----------------------------------------------------------------------------------
In addition different ranks started with different respsonsibilities:
Captain can probably claim to be the oldest, an individual who raised and commanded his own unit. When monarchs moved to keep regular troops rather than hiring ad hoc, it was soon discovered that a Company was not a big enough command to attract men of substance. For that you needed a regiment and a colonel.
Regiments were largest permenent units in an army. The commanding colonel was expected to be a man of some wealth and position, so as to be able to recruit and equip the unit. It may carry his name, he could often decide uniform, training, drill and equipment. Central control of these things came later and haphazardly. Any payment the colonel might get for expenditure would come slowly, so he might need to spend considerable credit on his own account to set the unit up properly.
The colonel might or might not be there to command the regiment in person on the battlefield. He might have other duties, such as fulfilling a "General Officers" role commanding over two or more regiments. (Yes, you could be both a general and a colonel, confused yet?) or he could simply be a court figure, unable or unwilling to go to war in person. In such a case command falls on the Lieutenant-Colonel.
A Lieutenant in the earliest sense, is simply someone who deputizes a role or "fills a place". This is especially common in old fashioned monarchies where someone well connected and placed would be appointed to the pay and privilges of a position, but then pay a professional deputy to actually do the job. Only later does lieutenant take on its modern meaning as the lowest officer rank.
Majors were introduced (I believe first into the French Army) to provide places for worthy but poor officers who deserved more than a captaincy, but could not afford the responsiblity of a colonelcy.
-----------------------------------------------------------------------------------
Also, as a caveat, but an important point to bear in mind, is that formal military ranks more or less imply a standing army. This tends to require a secure tax base and a strong government. For ideas on how that can effect things contrast the constitutional development of Britain and the US against France and Germany...