Answer :

If it was not authorized by the government then it is called a pirate ship. However if the government did authorize the ship it was called a privateer, only allowed to attack other ships in the time of war.