Pirates, those men and women that sail the sea and prey on other ships, have been around since the first caveman floated across a river on a log and another tried to steal the log from him. Pirates have been romanticized, with Hollywood films such as Pirates of the Caribbean portraying them as a benevolent, if slightly incompetent bunch with hearts of gold, while the truth is they were nothing like that at all. They were murderous thugs that lived by their own code and by no other.
In 1492, Columbus discovered America and shortly thereafter Spain conquered large tracts of South America, resulting in the sending of fabulous treasures from the New World back to Europe. This was too much of a temptation for the lawless members of society, and soon the seas abounded with pirate ships and their bloodthirsty crews, giving rise to the Golden Age of Piracy. In addition to those who were happy to attack any ship they came across, there were also many state-sponsored pirates known as privateers.
These ships sailed under the flag of a particular nation, carrying Letters of Marque that gave them permission to attack ships of a specific enemy nation (for example, British privateers attacked the Spanish regularly) in an effort to weaken that nation and steal treasure destined for its treasury. The privateer would then share any loot with their host nation. In addition to pirates and privateers there were also a number of countries that encouraged their ships to attack those of a different religion, and thus Muslim corsairs regularly attacked Christian ships and enslaved the sailors and anyone else on board. Aristocrats caught up in this were routinely ransomed back to their families at huge expense to the relatives.