There wasn't any fixed food or so and most of it varied according to the seas in which they were sailing in.
Anyone who was on the seas (be it for trade or pirating) always made it a point to stop somewhere where citrus fruits could grow so they could stock up and eat as many as they could during their voyage. Citrus fruits (oranges, lemons, limes) have Vitamin C, which is necessary to prevent getting scurvy.
This is why a "scurvy dog" is a popular pirate lingo thing to say.
This is also why the British are often called "limeys." During the peak of all the British trade routes, the go-to citrus fruit to gather and have on board were limes, so it became common to see and thus associate British sea-farers with eating limes.
In the Caribbean, for fresh meat, sea turtles were the main choice.
They were fast in sea so they were a bit harder to catch while sailing but once the pirates stopped at land, they would just hunt some to eat and turn the rest on their backs and come back later to carry them to the ship's hold where they would be kept alive. Furthermore, soft shelled turtle eggs were also pretty popular amongst the pirates.
Fish was the other source and was plentiful in the Caribbean but there were actually a lot of times when none would be caught. Other than that, sometimes when pirates came upon uninhabited islands, they would club the tame turtle doves and store them to eat as well. In the 17th and 18th century, hens were also kept sometimes for eggs and meat but they mostly finished after the start of the voyage.
As for the more sustainable food, hardtack biscuits were the main choice but many of them would become filled with worms and weevils so that wasn't very good food.
A favourite story of mine is how Henry Morgan thought he could just live off the land and did not load food onto his ships.
When the time came, his crew were so starved to death, they would start eating their leather satchels. A recipe was to slice the leather, soak it and then beat and rub between stones to soften it up. Scrape off all the hair and grill it upon fire, and then try to eat the pieces by making them small and with lots of water.
The term buccaneer derives from the Caribbean Arawak word buccan, a wooden frame for smoking meat, preferably manatee.
From this derived the French word boucane and hence the name boucanier for French hunters who used such frames to smoke meat from feral cattle and pigs on Hispaniola. English colonists anglicised the word boucanier to buccaneer.