Master and Commander (rank)
From WikiPOBia
A Master and Commander was a commissioned officer ranking above a lieutenant but below a post captain. The primary function of an officer with this rank was to take command of a small naval vessel (a sloop) which did not qualify for any of the six rates and therefore did not merit a post-captain.
The rank developed in the late seventeenth century and derives from the fact that, originally, such an officer was required to function as his own master as well as exercising overall command. However, by the late eighteenth century all but the smallest sloops (those with ten or twelve guns and a total crew of 45) carried a warranted master as well as the commander. In recognition of this, the words 'Master and' were officially deleted from the designation of the rank in 1794, although undoubtedly many officers already in the service (such as Jack Aubrey) would have continued to use the old familiar form of words for many years afterwards.
It was not uncommon for a lieutenant who had distinguished himself in action (perhaps by leading a boarding party or commanding a cutting out operation) to be promoted to commander shortly afterwards. This was very far from guaranteeing he would have a ship to command, since the number of commanders was often three or more times as great as the number of suitable vessels.
Somewhat confusingly, a commander who held a current commission - in other words, who was actually in charge of a vessel - was addressed and referred to as 'Captain [surname]' despite the fact that he was not strictly a [post] captain.
In the Canon
Jack Aubrey's commission as commander of the Sophie is given in full in the first chapter of Master and Commander. It is slightly unusual, though perfectly authentic, in having been issued by the local Commander-in-Chief (Lord Keith) rather than by the Admiralty.