The commander of a ship is the captain regardless his rank. Navy Captains usually command capital ships ... carriers, cruisers etc.
I see