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

By the Fall of the Republic, the Galactic Republic used the position of captain in its Judicial Forces, and, in 22 BBY, the government created a proper army. This new Republic Military, made up of clone troopers from the planet of Kamino, used the rank of captain in both its army and navy. Clone trooper officers who held the rank were known as Clone Captains, although non-clone officers could also serve as captains.

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 army, Clone Captains led companies of 144 troopers and directly reported to a Clone Commander. However, as many of the Jedi Generals had a creative approach to the chain of command, some captains worked directly with to their Jedi officer. Clone Captain CT-7567, also known as "Rex," was a notable Clone Officer. Rex led the 501st Legion's Torrent Company and worked directly with Jedi General Anakin Skywalker, serving as the Jedi's first in command.

Clone Captains in standard Phase I armor were initially distinguished by maroon markings on their white armor, but many captains began to customize their armor to showcase their individuality, show their company's image, and so they were not easily identified by snipers.

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 Confederacy 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 in the Imperial Navy, and Imperial Army. A stormtrooper captain from the army served as a military advisor to Queen Trios of Shu-Torun.

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.

The term could also refer to anyone who captained a vessel, regardless of their military rank. Thrawn captained the Chimaera while serving at the rank of commodore.

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 in the navy,. and Army. Two captains in the army's Stormtrooper corps were Cardinal and Phasma.

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 wore a gray uniform with a black armband edged in silver, bearing the name of Dillon, a particular Imperial hero of the Galactic Civil War, 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 bore a colored vertical line. The red colored were for personell in the army, while blue was for the navy.

In the Resistance Army, 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