For players to be promoted through the Empire's ranks they must complete missions or other favourable activities with Empire minor factions, and then complete a promotion mission for the Imperial Navy - these are generally named as "Naval Ascension Opportunity" or something similar (as of version 2.1, missions names look like "Imperial Navy Acquisition Contract" or "Courier Job for Imperial Naval Intelligence" or similar, you can find if the mission is a ranking one by looking at the mission details where there will be a "Rank progression" line in the "Additional" section - scroll to the bottom of the details, generally it's the last line).
How much progress one has made toward a rank can be seen in the right HUD panel, in the Reputation section of the Status tab.
There are several types of mission that give Ranks, but Charity Missions are generally viewed as the most useful and fastest. If you cannot find a place to do Charity missions, trading Imperial Slaves for Robigo can increase your rank, although very slowly, and make you a lot of money on the side, as the Faction that issues them are Empire aligned.
(Remember to check which missions come from who, to stop yourself accidentally leveling up, for example, the Alliance.)