This was a specific point brought up in the 'Fleeting Guide?' thread by the esteemed @Valiens Nantaris and as I'm incredibly bored at work today I figured I'd write something on it.
Military ranks can be something of a mystery to people who have no experience with the military. Hell even within individual branches, good luck trying to get a sailor to remember all the different types of sergeant in the Army and Marines.
The following applies primarily to the US Military, and the Navy at that. It can reasonably be extrapolated to apply to a futuristic space Navy, i think, and it tends to be the metric I judge things by.
There are two general types of classifications here, Officer and Enlisted. Technically speaking, only the former actually have 'rank,' while the latter have 'pay grade.' In both cases, the rank implies both increased authority, responsibility, knowledge, etc. and are paid more than those below it.
E-1 Seaman Recruit
E-2 Seaman Apprentice
E-3 Seaman (2 years)
E-4 Petty Officer Third Class (3 years)
E-5 Petty Officer Second Class (4 years)
E-6 Petty Officer First Class (8 years)
E-7 Chief Petty Officer (12 years)
E-8 Senior Chief Petty Officer (16 years)
E-9 Master Chief Petty Officer (20 years)
These are the enlisted 'ranks' and as you should be able to notice there are three distinct groups. Now the navy gets an extra dose of complication in that it uses a 'rating' system where your specific job (in other branches called an MOS) is tied in to your paygrade for your proper title. So for example an E-4 who is a Damage Controlman is properly a 'Damage Controlman Third Class' or simply 'DC3.' At any rate this isn't super important for writing here so I'll skip over it.
The groups are the 'seaman' ranks (which can probably safely be changed to 'spacer' for Star Wars purposes), the 'Petty Officer' ranks, and the 'Chief' ranks.
If you're familiar with the concept of a NCO (Non-commissioned officer) be aware it works very differently in the navy than in the other branches. A PO3 is technically an NCO but doesn't wield substantially more authority than a senior E-3, nor substantially less than a junior E-5 (there are exceptions to this, of course).
Contrary to what seems to be a popular belief among people with little/no association with the military, one does not generally go from enlisted to officer. The (x years) next to each paygrade are the approximate time one can expect to put on that rank according to the way the system is written.
Generally speaking, a Seaman/Spacer can be expected to know their job and some basic Navy stuff, a Petty Officer is a technical expert in their job and a low level leader, and a Chief is all of the above plus a solid deckplate leader. If you imagine a work division on a ship being like an army platoon, the seaman are the grunts, the PO3/2 the Corporals, the PO1 the grizzled sergeant, and the Chief the old crusty staff sergeant.
What's missing? Oh right, the moron butterbar who seems to do his damnedest to get the platoon killed. Which brings us to the officers.
O-1 Ensign
O-2 Lieutenant Junior Grade
O-3 Lieutenant
O-4 Lieutenant Commander
O-5 Commander
O-6 Captain
O-7 Rear Admiral (Lower Half)
O-8 Rear Admiral (Upper Half)
O-9 Vice Admiral
O-10 Admiral
There's no year thing next to the ranks here because I don't really know. Lieutenant is automatic after 4 years, and to be a Captain on a ship requires a minimum of 21 years of service. That should give an idea.
Bit of a note here, one should never confused the rank of Captain (O-6) with the fact that it is customary on any ship to call the Commanding Officer the 'captain' whatever their actual rank. The rank Captain is not necessary to command a ship, even in the USN destroyers are commanded by Commanders (who are still addressed as 'captain' by the crew) and smaller ships by Lieutenant Commanders or even Lieutenants.
Why does this matter? As with everything else on a Star Wars RP Forum it doesn't, but it can lend an air of authenticity to your character profile. It could also be an explanation for why your 19 year old gammorean princess got rejected when you tried to apply for the rank of High Admiral of the Dank Empire.
I didn't really cover what it means to be an Ensign (in truth, nothing, you're a dirty useless space-taking up piece of potential officer material in my opinion, no offense) so I'll get that in another post.