When Captain David Glasgow Farragut assumed command of the newly designated West Gulf Blockading Squadron, he was also assigned the title of flag officer. He’d risen to the highest rank a United States officer could hope to achieve at the time. In the army, he’d have held the rank of colonel. The American navy did this because it didn’t want to be like the British navy, which did have admirals.
A flag officer, or in earlier years a commodore, was the highest ranking captain in a fleet or naval squadron. Thus, he was the overall commander.
The Civil War brought changes to the Navy’s command system. New ranks were created by Congress — ensign, lieutenant commander (formerly called a lieutenant commanding if he commanded a ship) and yes, admirals. Because of his victory at New Orleans in April 1862, Congress made Farragut a vice admiral. Eventually, he worked his way up through the ranks to become a full admiral.