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
In the republic both army and navy used the rank.

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 Clone Captain were distinguished by red marks on their white armor.

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
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
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.

Non-canon appearances

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