The Spanish Main was the stretch of coastline in the Americas controlled by Spain in the 16th through the 18th centuries. It stretched along the northern coast of South America, across Central America along the Caribbean, and up into the lower part of North America. This region became a popular spot for pirates and privateers who wanted to take advantage of Spain's heavily laden treasure ships.
Spanish colonies in the Americas stretched across a huge swath of land at one point. This land was rich in gold, minerals, spices, and a variety of other exotic treasures. The Spanish exported treasures in large treasure ships, which often traveled in fleets for protection. By keeping an eye on a few key ports along the Spanish Main, pirates and other raiders could figure out the best time to strike.
Thanks to the fact that pirates congregated throughout the Spanish Main, the term “Spanish Main” has come to have romantic connotations, especially in societies where people have an enduring interest in pirates and the history of piracy. Sailing the Spanish Main was certainly profitable for pirates and privateers, especially those who were bold enough to go after larger fleets.
It is important to distinguish between pirates and privateers when discussing the Spanish Main. Privateers were citizens who received special permission from the monarch in the form of letters of marque which allowed them to attack foreign shipping. Many privateers were English, with monarchs using them as a political tool to wage economic war on enemies like Spain. In return for their letters of marque, privateers were obliged to turn part of their profits over to the crown, but they also enjoyed the privilege of being able to openly sail into their home ports with their prizes.
Pirates, on the other hand, operated beyond the law. Pirate crews were often quite diverse, and they were accountable only to each other. Some pirates were former privateers who realized that they could enjoy much more profit if they stopped turning their winnings over to the crown. However, pirates were also exposed to the possibility of reprisal and punishment for their crimes, and they didn't enjoy the benefits that privateers had, such as the ability to make port anywhere for repairs and supplies.
Sailing was an extremely hazardous business in the era of the Spanish colonies, and when ships were lost off the coast of the Spanish Main, it wasn't always clear if the ships had simply encountered foul weather or fallen victim to poor navigation and sunk, or if they had been taken by pirates or privateers. Despite constant raids on its treasure ships, Spain managed to profit to an extraordinary level from its colonies, in no small part thanks to ample slave labor which made extraction of natural resources very inexpensive.