Pirates did lots of things. Mostly, they sailed around in thier ships and plundered trading ships, etc. From all the countries. They did this illegally of course, as they did not have a letter of marque. A letter of marque was a commission signed by the king that gave someone the right to attack enemy ships, but not ships of their allies. This, however, was not the case of pirates. Pirates attacked ships of all shapes and sizes, and ships from all countries, stealing gold, slaves, and provisions. Sometimes pirates even attacked, invaded, or ransacked a town, maybe holding a few citizens hostage.Pirates became very popular around the 17th century. That time was known as the Golden Age of Piracy (1690-1720). Pirates used their money to upgrade their ship, by themselves and their crew supplies, or provisions, and even used the money to get girls (pirates were very unruly). Most pirates, however, became a pirate because of thier love for the sea. England pretty much ruled the sea at that time with the Royal Navy. But many men who loved the sea did not wish to join the Royal Navy, for the crew was treated horribly, leaving the best to the captains. Because of this, many turned to piracy. Piracy can also be considered the first show of democracy. Pirates were very fair and everyone received a fair share. They also voted for captain and first mate, etc. Also because of this fairness and equality of piracy, many left the Royal Navy or turned away from privateer-ing. Part was from greed as well, I expect. Sorry for elaborating so much, but piracy is one subject that has always interested me. I hope I answered your question well. :D
Personally I doubt to some extent the answer 'love of the sea' as a reason for many pirates, but Sabby92111 is broadly correct in their details. Essentially pirates plundered any and all ships, save those of communities they may have had personal treaties with - I cite particularly the barbary pirates, though back the emergence of pirates in ancient Greece and rome many had an equally complex relation with the concept of sanctioned piracy - though many also focused on inland expeditions such as Morgan's sack of Panama of Dampier's journeys across the Isthmus. They tended almost universally to equality and reasonable sexual, religious, political and even racial equality on board ship. Many saw the equality in risk and reward aboard ship as well as the general improvement of conditions as seductive, captured crewmen frequently join the pirates. On the darker side for many especially in hard times a slave was still a profit (whatever colour he was) and it was often easier to kill than capture anyone you couldn't support or had no use for. Late in the century pirates also stepped up and eye-for-an-eye style campaign (though I in no way infers any extreme unity of action in this) of taking, killing the crews of and sinking ships from known pirate killing ports. As this infers of course there were 'pirate' ports and town where their trade was welcomed and they often formed their own settlements, one supposedly creating a democratic settlement for retirees from the crew where every crewman must serve as an elected governor before any can be elected for a second term. It should be noted however that shares on a pirate ship were not often equal, though they may be fair, a captain could received up to 2 shares, officers 1 1/2 to 1 3/4, whilst cabin boys and musicians received in the region of 1/4 -3/4 of a share.