Privateers were privately owned ships that were equipped and crewed at private expense but were given official government licence to attack, raid and harass the enemies of said government in time of war. Privateers were de-facto legal pirates that were supposed to be treated a legitimate combatants if captured.
Privateers achieved their authority through the "Letter of Marque." The letter of Marque was a government commission and permission to a private citizen to build their own warships. The use these warships was to gain "prizes" (captured enemy ships and their cargo) that would be sold in friendly ports. The government received up to twenty-five percent of the profit gained by the privateer from these auctions. This greatly added to the number of ships available to wage war upon an enemy for virtually no cost to the government.
The most famous privateer was Sir Francis Drake, sailing the Golden Hind, he became the first Englishman to sail around the globe (1577-79). In his attacks upon Spanish shipping on that voyage he brought home a treasure reported to be worth more than the entire yearly expenditures of the English Government (the capture of the Nuestra Señora de la Concepción alone netted more than 15 million dollars in today's money in gold, silver and jewels). His backers earned a 4700% return on the money they invested in his ships and crew for this epic voyage. He so angered the Spanish through his successful raids that they offered a 20,000 ducat reward for his capture (over 7 million dollars). It was never collected.
Merchant ships were large, slow targets for the smaller and faster privateers who preferred to capture rather than destroy these valuable targets. The lure of easy pickings brought many a privateer to sea during major conflicts (more than 1200 Letters of Marque were issued by the Americans during the Revolution alone).
Privateers tried to avoid battle with warships as the latter were usually better armed and carried little cargo of value. But occasionally the warships caught up with the privateers as in this action between the American Chasseur vs HMS St. Lawrence in the War of 1812. The American won, an unusual occurrence for privateers.
Privateers came in all sizes, brigs and sloops were the most common but they could be small as this Confederate privateer during the American Civil War demonstrates. The American Civil War was the last major action by privateers, the Industrial Revolution, improvement's in Naval technology and communications reduced the need and increased the risk to the point that privateering was no longer profitable. Future wars would see more deadly ships and subsurface vessels whose goal would be to destroy, not capture enemy commerce. The age of legal piracy was over.