- officers in command of a naval vessel, who were (and still are) addressed as captain regardless of rank;
- commanders, who received the title of captain as a courtesy, whether they currently had a command or not. (Note that Commander's rank is lower than Captain.)
Once an officer had been promoted to post-captain, his further promotion was strictly by seniority; if he could avoid death or disgrace, he would eventually become an admiral (even if only a yellow admiral).
In the Royal Navy of the time, an officer might have a rank, but not a command. Until the officer had a command, he was "on the beach" and on half-pay. An officer who was promoted from commander was a captain, but until he was given a command, he was on half-pay. Once the captain was given a command, his name was "posted" in the "Naval Gazette."
An officer "took post" or was "made post" when he was first commissioned to command a rated vessel — that is, a ship too important to be commanded by a mere commander.
Unrated vessels could also in some cases be commanded by post-captains. Being "made post" is portrayed as the most crucial event in an officer's career in both Forester's Hornblower series and O'Brien's Aubrey-Maturin series.
A junior post-captain would usually command a frigate or a comparable ship, while a senior post-captain (i.t. a full rank captain) would command a ship of the line.
Rank Insignia
After 1795, when they were first introduced on Royal Navy uniforms, the number and position of epaulettes distinguished between commanders and post-captains of various seniorities.
A commander wore a single epaulette on the left shoulder.
A post-captain with less than three years seniority wore a single epaulette on the right shoulder, and a post-captain with three or more years seniority was the same as captain and wore one epaulette on each shoulder from then.
In the O'Brian series, Aubrey "wets the swab" -- that is, he celebrates his promotion to commander (and the acquisition of his "swab" or epaulette) with the consumption of copious amounts of alcohol.
Note that the term was descriptive only: No-one was ever titled "Post-Captain John Smith".
Post-ships
Post-ship was a designation used in the Royal Navy during the age of sail to describe an unrated ship (see rating system of the Royal Navy) which was, for whatever reason, and usually temporarily, commanded by a post-captain instead of a lieutenant or commander. When a post-captain took command of an unrated vessel she would instantly transform from a brig or sloop-of-war to a "post-ship". When the post-captain relinquished command the vessel would transform back to her normal status.
Unlike other uses of the term "ship" during this era, "post-ship" implies nothing on the rig of the vessel.
Main source: Wikipedia