der Pirat
pirate
A person who attacks, robs, and captures ships at sea; a sea robber.
In dem Abenteuerfilm kämpft der Kapitän gegen eine Bande gefährlicher Piraten.
In the adventure film, the captain fights against a gang of dangerous pirates.

pirate
Loading your saved state.
pirate
A person who attacks, robs, and captures ships at sea; a sea robber.
In dem Abenteuerfilm kämpft der Kapitän gegen eine Bande gefährlicher Piraten.
In the adventure film, the captain fights against a gang of dangerous pirates.

'Der Pirat' is a weak masculine noun (n-declension). This means it takes the ending '-en' in all cases except the nominative singular. A common mistake is forgetting this ending.
Ich sehe den Piraten am Horizont.
I see the pirate on the horizon.
The three meanings can be distinguished well by context. If it is about ships and the sea, the sea robber is meant. With topics like the internet, software, or films, it is about copyright. In the context of elections and politics, it means a party member.
Der Pirat vergrub seinen Schatz auf einer einsamen Insel.
The pirate buried his treasure on a deserted island.
The figurative meaning for a person who creates illegal copies is very common today. Here, 'Pirat' is often used as part of compound words such as 'Softwarepirat' (software pirate) or 'Produktpirat' (product pirate).
Ein Softwarepirat hatte das Programm schon vor der Veröffentlichung online gestellt.
A software pirate had put the program online before its release.
Viking
'Pirat' and 'Wikinger' can both be connected with ships, the sea, and attacks. Still, they do not mean the same thing. A 'Pirat' is someone who attacks and robs ships. This can happen in different historical periods. A 'Wikinger' belongs to historical seafaring peoples from Scandinavia. Vikings were not only raiders, but also traders, settlers, and warriors. The confusion often comes from images in films and stories. Remember: 'Pirat' mainly describes an action, while 'Wikinger' describes a historical group.

Im Film greift der Pirat ein Handelsschiff an.
In the film, the pirate attacks a merchant ship.
Der Wikinger reiste mit seinem Schiff von Skandinavien nach England.
The Viking traveled by ship from Scandinavia to England.