Weapons:
The favorite weapon of pirates was the cutlass. The cutlass was a short bladed, curved sword, sharpened on only one edge. A cutlass was shorter than a sword and worked well in the close quarters combat of pirate era fights. Also, a cutlass cold be carried in the teeth as a pirate climbed or swung into a prey ship. In fact, the pirate cutlass was so effective that it was eventually used by most navies of the world during the pirate era.
A pirate would also usually carry a dagger. A pirate dagger was basically a smaller cutlass. It was carried by most pirates because of its small size and many uses. A dagger was used as a working tool, cutting line or sail. The pirate would also use his dagger to cut food. The dagger also served as a last means of defense in a fight.
Pirates also frequently carried (usually flintlock) pistols. Of course, the pistol was a much more deadly weapon than the cutlass, providing the pistol fired. In the wet conditions of a pirate raid, a flintlock pistol frequently failed to fire.
Axes were another pirate weapon. An axe could be used by a pirate to help climb the side of a ship and also to cut through rigging lines. An axe was handy for opening closed doors and hatches while boarding. The axe could be used as a deadly, close-in fighting tool as well.
Despite depictions in the movies, pirates did not normally use swords a great deal. The sword has more reach than a cutlass, but is not so maneuverable in close quarters fighting. Also, a sword normally requires a scabbard and requires time to draw.
A bow or crossbow would mainly be used by a pirate to pick off personal from the decks of the victims ship before boarding. Once a fight had started, a bow or crossbow would not be of too much use on the rolling, pitching yawing deck of a sailing ship.
A pirate might use a musket, much as he would a bow or crossbow. A musket was used by the pirates more as a long range sniping weapon rather than a boarding one. The preferred musket was a type called a marksman's musket. It was a longer musket with grooving inside the barrel. A pirate sharpshooter could use a marksman's musket to shoot the helmsman of another ship.
Cannon:
Originally cannon were cast from bronze. However, iron or steel is much stronger than bronze and the iron materials soon replaced bronze.
The ship's cannon of the classical pirate period were large, heavy objects. They had to be long to allow the slow burning gunpowder to build up force to provide range for the cannonballs. The early cannons were not of very good quality iron and had to be heavy to be strong enough to hold the charge of the gunpowder when it burned.
In order to handle the recoil of a cannon, the typical ship's cannon was mounted on a wheeled platform to allow the cannon to recoil back after it was fired. The recoil was limited by lines.
The wheeled platforms could turn a cannon that broke its restraining lines into a deadly force aboard the ship from which it was fired. The phrase 'loose cannon' survives to this day.
Pirates did not fight ship to ship battles if they could avoid it. There was usually no profit in fighting a heavily armed opponent and pirates went after unarmed or lightly armed prey. However, it was necessary for a pirate ship to have enough cannon so that a lightly armed merchant ship wold have no chance in a ship to ship battle. Thus, the lightly armed merchant ship would surrender, rather than fight a hopeless battle.