Basically if you don't get yourself killed after a while they put you in charge of other guys and make you an officer. You can get to be an officer for just doing your regular job well enough to supervise others, but you don't get a "commision" unless you do something outside of that. Nowadays they send you away to officers training school which is like college. Or you can skip the whole NCO track if you go to college before you join the service.
In the past you could get your commision other ways. Battlefield commisions happen during big wars sometimes. And in olden days you could be given a commision simply by being a landowner or an important member of soceity. That was basically jut a way to keep the riff raff from thinking they were equal to you just because they happend to join the army before you did.
Geoschmo