Well, pirates are not technically my flair, but they are a side interest, so I can probably put together a competent answer. Anyone else can feel free to add on.
So, let's start with some basics. I'll assume we're talking about Golden Age pirates, 17th/18th century. We're talking about a time where the New World around the Caribbean was made up largely of huge plantations worked by slaves but controlled by Europeans. The Europeans who had commandeered the New World had found that in particular, the climate of the Caribbean was wonderful for growing Sugarcane, which is of course the source of sugar. Thus, vast amounts of sugar were being produced and shipped out back to England for use in the triangle trade. Since Rum is made from fermented and distilled sugarcane, it was somewhat plentiful in the new world.
Thus, the British navy in the New World began giving its sailors rations of rum instead of its usual drinks (like French brandy). By the time of the golden age, the Royal Navy was supplying each sailor with a half pint of rum or a gallon of beer each day. The reasons for this were twofold: first, it kept the sailors happy. It was when alcohol rations were cut or ran out that sailors would really start to get pissed off. Second, and more importantly, it was notoriously difficult to keep water aboard a ship without it getting rancid. This was partly due to the length of the voyages, but also because conditions aboard sailing ships were horrendously unsanitary. Thus, the navy turned to alcohol as a clean source of water. Incidentally, it also led to sailors being drunk much of the time that they were working.
So lets's move on to pirates now. Most pirates began their career as naval or merchant sailors. On these ships, as we have just discussed, they became accustomed to large rations of alcohol. Therefore, when they eventually turned pirates, most of them would have just continued drinking huge amounts of alcohol. But, since they were no longer supplied by the British Navy, they had to rely on what kinds of alcohol were available for purchase or theft. This meant that largely, pirates became associated with drinking rum, since sugarcane was everywhere in the Caribbean.
But, they were also drinking lots of other things, pretty much whatever they could get their hands on. The settlers in the Caribbean (and the New World) relied on European imports to supply them with goods that were not produced in the New World, such as wine and other types of alcohol. Thus, there was a robust trade going on between Europe and the New World which included lots of European alcohol coming in, and lots of rum going out. It was therefore very likely to come across a ship carrying alcohol. When the pirates hit these ships and found their holds filled with alcohol, they would usually just keep it for themselves to drink. So, if they hit a ship with lots of wine (a somewhat frequent thing), then they would be drinking wine for a while. The same with most other types of alcohols.
So, of course they would come across a lot of Rum, coming from England (where it was frequently distilled) or the Caribbean. They might also come across wine coming from Europe, or gin, which was being produced at the time in huge quantities. There are records of huge pirate wine parties after the taking of ships carrying lots of wine. Still, they might find cider or beer, which were popular in the New World although probably not shipped overseas with as much frequency. Other spirits being shipped in from Europe would also have been consumed. Finally, to fix the issue of rancid water, you would have found pirates drinking a fair amount of grog; grog is simply water mixed with a bit of alcohol (usually rum), which makes it relatively sanitary and less disgusting tasting.
With all that, let's turn to the originally question. What was the rum like that pirates drank? Well, since there was no uniform policy to acquiring rum (as we have seen), it was a bit all over the place. Mostly, though, it was dark or spiced rum. At the time, rum was mostly aged in barrels, which gave it its dark color. To get white rum, you've got to filter it a lot, or to age it in steel, which would have been harder to do in the new world (if possible at all). Added to these rums were frequently fruits and spices, but mostly those found in the new world. Modern rums have the benefit of access to spices from all over the world, but Golden Age rum makers were much more restricted.
Most rum was super high in alcohol content; in the navy, they would mix rum with gunpowder and then ignite it to check its proof. We know today that this method only works for rums at or above 57% ABV. The Royal Navy would check the rum that it bought to see if it was at least at this level, so it must have been that a large portion of rum was indeed so highly alcoholic.
As always, if anyone wants to add on to this, or to amend it, they can feel free to.For further info, you can check out The Republic of Pirates (Colin Woodard) and Empire of Blue Water (Stephen Talty), who both make good use of the primary sources regarding pirates and their ways of life. If you are looking for a more fanciful account, take a look at A General History of the Pyrates, which is essentially one of the works from the Golden Age which made pirates into the swashbuckling rum drinkers that they are in our imagination.
I assume you mean the west's popular conception of piracy in the 17th century Caribbean. The 17th century was widely a time of instability and sea trade internationally, two key ingredients of piracy.
Anyway, pirates palettes were not widely different from their landlubber counterparts. Prior to roughly the mid-to-late 17th century the vast majority of New World liquor had to be imported. (Excluding the Spanish/Portuguese colonies. In fact, going forward just presume I'm not talking about them unless I say otherwise.) And it was exported in large quantities. The most popular liquor was brandy, with French brandy being considered of the best quality. Some navies, particularly the English, would sometimes use whiskey. But this was considered an inferior substitute. Although by the end of the century there was some patriotism around whiskey. When the English banned French imports, including brandy, in the lead up to a war the war's supporters promoted the drinking of beer and whiskey over wine and brandy as a patriotic action. (Also as something of a dig at the aristocrats, who preferred wine and brandy.)
Back on topic: the earliest proto-rums were made by Genoese merchants in the first Spanish colonies as an attempt to make arrack with New World or tropical plants in the late 15th century. (And, of course, to sell it for a bundle in a society rich in commodities and poor in money.) This was fairly clever on their part as they correctly identified native plants as similar enough to some South Asian plants to make arrack. They succeeded and unfortunately we don't know if they were making white or dark arrack. The best guess is that it was dark since white arrack is not attested until later on and is a bit harder to make.
While Genoese merchants were a common sight in especially the Spanish colonies, it's hard to trace any direct line of descent. Particularly because the equipment was almost universally locally manufactured, often with local variations or influenced by the alcohol production cultures of their societies. Producing alcohol and liquor would have been familiar to any European or African in the New World. And the Native Americans would have been familiar with things like beer but not liquor. So there was ample room for local influence. Regardless of whether it spread or was independently invented, it spread through the Spanish and Portuguese colonies and rum was being produced all throughout the Spanish and Portuguese Caribbean by the late 16th century. This spread of distillation throughout the colonies is also how you got tequila, which is a distilled form of native liquors.
But none of this would have been available to your average pirate. The Spanish were their victims and while they would drink it if they captured it the Spanish would not freely sell it to them. This was a time period of mercantilism and it was not easy for foreign ships to gain access to colonial ports. Nor was it commonly exported back to Europe for sale on the open market. If it was, it was very expensive outside of Spanish/Portuguese territory. So the average pirate would have continued to purchase brandy if they could get it, whiskey if they couldn't.
This changed during the Anglo-Spanish War (1654-1660). The English and the French seized Spanish Caribbean territory, including slaves and stills used for producing rum. Jamaica in particular was a major center of rum production that was now in English hands. Further, while the French natively produced brandy there was less appetite for English whiskey, so rum became the drink of choice for English sailors (piratical or otherwise) in the New World. It was also significantly cheaper than importing brandy from Europe, especially over time.
This quickly proliferated throughout the colonies, especially the English and French colonies. New England quickly emerged as a distilling center due to their relatively high concentration of skilled labor. They had the metallurgists and distillers necessary to make high quality stills and liquor. They also didn't use slaves as workers, which more or less always correlated with higher quality products. (To be clear on this point, it wasn't, as some planters believed, because African slaves were stupid. It was because slaves did not like being slaves and had no incentive or investment in the products or success of their own work. So they did the bare minimum.) This was part of a wider trend where the Northern colonies served to produce goods the sugar colonies needed so they could focus on only producing cash crops. A lot of Caribbean wood structures were built with beams that came from New York, for example.
(One of the little ironies of history is that English Protestant religious zealots who considered drunkenness a sin were absolutely central to the development of rum. Without Cromwell, we might have never had English rum.)
So we now have the broad shape of the market in the late 17th century: a mature Spanish market (and a smaller but equally mature Portuguese market). A slave based Caribbean market divided into French and English halves that was a mix of the old Spanish market and new English/French market. And a free labor based New England market that was very new. These produced a wide variety of rums, most of which would be basically familiar to us. They had white rum, flavored rum, spiced rum, dark rum, and many other rums we wouldn't recognize in what is a far more industrialized production process. (Though they would also have had to deal with less much less quality control, which led them to value rum from places like New England that had relatively high quality standards.)
Firstly, if you are a modern American, you are most familiar with a form of Spanish rum. Puerto Rican rum such as Bacardi (which is actually heavily Cuban influenced) have dominated the American market for a long time. In general, Spanish styles of rum emphasize smoothness as an important quality. But this taste was relatively recent: more of a 21st century shift. In contrast, English/American alcohol production (indeed, to this very day) tends to emphasize alcohol content and traditional American/English rum was no different.
Still, a 17th century pirate would basically recognize what you drink as rum. They might call it anejo rum or Spanish rum. They would probably find it curious that it's so common in English colonies but only in the same way it would seem strange to us if we went three centuries into the future and found out rum mainly meant black spiced rum to the point no one called it spiced anymore. It's not that we wouldn't recognize what t he rum is or think it's disgusting but it would be different.
An English pirate would prefer what they'd call English or rude rum (rude in this case meaning "strong" as in rude health). It would generally be dark, retain more molasses flavor, have a fuller body, be less smooth, and have a much higher alcohol content. The primary thing they'd be looking for was alcohol content, to the point they wouldn't mind if it was mixed with moonshine to get that content up (as it sometimes was). That said, it wasn't as if they preferred this to the exclusion of all others. Brandy was still common, though as cheaper options became available increasingly a status symbol. And whiskey and moonshine were around, though generally not as preferred as rum. (There were also status divisions with rum, with French rum being for the more refined, sensitive tongued individual. It was generally smoother and more flavorful. And thus more expensive. Though English rum appears to have been most popular with sailors. It seriously appears their only qualification was alcohol content.)
As for other drugs, they absolutely smoked tobacco. Marijuana was available, especially in certain areas like Brazil, though not widely so. It doesn't appear to have been popular with pirates as most references are among to banning its use among land based workers. Opium was around, especially as the time went on. Coffee, cocoa, sugar, and vanilla were all included in druggists books of the time. You have to understand that the concept of "drugs" we have today didn't exist until the late 19th/early 20th century. It was basically invented through the moral views of the Progressive movement which sought to scientifically distinguish things like alcohol or marijuana and ban them. To this day, the distinction between drugs and food is, at best, blurry except as where enshrined by Progressive (with a capital P) laws like the Pure Food and Drug Act and its successors like the modern Drug Schedule.
No 17th century pirate would have recognized such a difference. Indeed, early Spanish conquistadors would have thought that maize and wheat had permanent effects on their body through various humoral mechanisms. The 17th century was, at best, the very beginning of modern chemical and biological understanding.