Captain

"Han Solo. I'm captain of the Millennium Falcon."

- Han Solo

In civilian life, a captain was an individual who was in charge of a starship. In military organizations such as the Imperial Navy or the Royal Naboo Security Forces, a captain was an officer of high rank with leadership responsibilities.

Galactic Republic
"My name's Rex, but you'll call me Captain or Sir."

- Clone Captain Rex

In the Galactic Republic, officers in the army and navy used the rank of captain.

Many clone navigation officers, some of whom held the rank of captain, wore a single-rowed plaque, with two red and one blue square (from left to right). In the Grand Army of the Republic, the standard Phase I clone troopers who held the rank of Clone Captain were distinguished by red markings on their white armor.

Confederacy of Independent Systems
"Captain! Show this droid what happens when you use that word"

- Osi Sobeck, to a droid commando captain

The Confederacy of Independent Systems used the rank of captain. In the Separatist Droid Army both organic officers and droids could hold the rank. Rackham Sear, a male Kage Warrior served as a captain in the Confederacy military and the Separatist's also utilized BX-series droid commando captains. One captain served at the Citadel.

The rank was also used the Separatist navy. Captain Mar Tuuk served in the CIS navy, and commanded the Ryloth blockade from his Lucrehulk-class Battleship.

Galactic Empire
In the First Galactic Empire, there were captains only in the Imperial Navy.

On the Imperial insignia plaque of the rank, there were three red colored squares over three blue, or alternatively, a single row of of six yellow squares,  or three blue squares followed by two red.

Alliance to Restore the Republic
In the Alliance to Restore the Republic there were captains both in the army and the navy.

On the insignia of a rebel captain, there is two colored pips over each other. The color of the pips (red or blue) indicates the branch of service.

This is true of the early rebellion as well.

First Order
"I know I'm not supposed to initiate contact with officers, but look at you! Never took you for captain material. Batch Eight, heigh-ho!"

- Stormtrooper 926, to a disguised Finn

In the First Order, there were captains only in the navy.

The First Order ranks were marked by a combination of uniform color and arm insignia, worn on the left sleeve of the uniform. The First Order captains were wearing a gray uniform with a black armband edged in silver, bearing the name of a particular Imperial hero of the Galactic Civil War, Dillon depicted in silver Aurebesh letters.

Resistance
"Our plan, Captain? Not commander, right? Wasn't it Leia's last official act to demote you?"

- Amilyn Holdo to Poe Dameron

In the Resistance, there were captains both in the army, and the navy.

The rank badge of the Resistance captains bearing a colored vertical line. The red colored is in the army, while blue is in the navy.

In the Resistance navy, the rank of Captain was lower than that of Commander.

Non-canon appearances

 * William Shakespeare's The Phantom of Menace: Star Wars Part the First
 * Star Wars Epic Yarns: A New Hope
 * LEGO Star Wars: The Force Awakens
 * LEGO Star Wars: The Force Awakens
 * LEGO Star Wars: The Force Awakens