commissioned officer rank of army, marine corps and air forces - NATO rank code of OF-2.
Captains are officers in an army. In a navy, captains command an entire ship. A Navy Captain is equal to the army rank of colonel. Another type of captain is a commander of a ship who is not in the military.