As everyone mentioned performance is the key. But, there are other things too as Capt MJ mentioned qualifications. 0-4 and above will require a Master’s degree and professional military education completion. It is also about following the correct career path. What you want to do vs what is best for your career balanced with needs of the Navy, what’s best for the family etc. has to be considered. Each community has its own ‘best path.’ Even within a community it can vary. To be a Destroyer CO vs an Amphib CO can have slight differences. Each step of the ladder you will get visibility to a level or two above and start to know what is needed for em each rung you climb.