First of all, you need to find a well-matched opponent. The stronger pirates have cannons with longer ranges, so they're harder to fight.
In order of increasing difficulty, the pirates are Not Really Fearsome Pirates, Semi-Fearsome Pirates, Mildly Fearsome Pirates, Pretty Fearsome Pirates, Fearsome Pirates, Really Fearsome Pirates, and Captain Rottingham.