No, most movies are not accurate in their portrayals of pirates. In most movies, pirates are portrayed as more lovable and admirable than they really were. Even villainous pirates are often portrayed in a somewhat sympathetic light. Real pirates were terrible people who committed horrific crimes and should not be admired.
A lot of pirates in history did look like what we see in the movies, but a lot of them also looked completely different. This image of the bearded guy with a sword and a parrot on the shoulder was not exactly how they are described and portrayed in book that actually teach history.
No, pirate movies take a great deal of artistic freedoms when portraying pirates. Hollywood bastardization of history is the norm in everything from Wild West to Roman empire-movies. The image of the dazzling swashbuckler with a heart of gold and a code of honor as illustrated in Pirates of the Caribbean and others have no bearing on the actual pirates that plagued the waters in this era. The absolute majority were in fact cruel bastards living a wretched, unglamorous life of sheer brutality.
Audiences expect a certain look and sound to period movies and pirate movies. Even if Hollywood producers and directors strove for more accuracy in the movies they made, the audiences would not appreciate the effort. Due to many pirate portrayals in the past, current movie makers have to stick with what audiences expect.