As far as actual Viking Age Scandinavians were concerned, a vikingr was a person who went off on journeys to trade or raid (not exclusive things, really), and raiding included sea-based raids on ships as well as raids on land from the sea or waterways. So the term 'pirate' and 'viking' are certainly not mutually exclusive; 'vikingr' was essentially the Old Norse word for pirate, and it was applied to non-Scandinavians equally as to Scandinavians.
The term was borrowed into English in the 19th century when viking-romanticism largely invented the modern image of Vikings (on a lot of historically-shaky premises; e..g the horned helmets and burning-ship burials and so on). The term has rather vague definitions being used more strictly to refer to Scandinavians of the Viking Age who were vikings in the Old Norse sense, or more loosely to refer to any and all Scandinavians of the Viking Age, even acting like it was a ethnic demonym, even though it certainly never was. (Danes were Danes, Norwegians were Norwegians, etc) Scandinavians historians are largely against using the term broadly, because it makes no sense historically to do so. Most Scandinavians of the Viking Age were not vikings in any sense and had nothing to do with it. Even out of those who were, it's uncertain if many of them would've identified as such, and it wasn't something they identified with as their nationality or culture.
'Pirate' in English is a pretty broad term as well; from 17th century Caribbean buccaneers of European extraction to Somalis in speedboats in the present day, and that would certainly not be exclusive with vikings as they themselves used the term.