Pirate Battle is a game mode that allows you to win gold bars by answering questions in any of the game's categories. You can find it in the Events section, below Missions.
As soon as you enter you will find different goals, which you will have to reach in order to obtain the chest and a squad where your ships will be randomly positioned. The purpose is to bring down all of your opponent's ships.
Once it is your turn, you will see all the available spaces to attack; if you select a space where your opponent has a ship placed, you will be able to answer a question to shoot it down. If you answer incorrectly, you can use gold bars (if you have the ad-free version) or watch a promotional video to get another chance to answer.
If you manage to shoot down all of your opponent's ships, you will conquer the objective, the next one will be enabled, and so on, until you win the game.
Don't worry! If you don't reach the goal or give up, you can try again in exchange for tickets (if you have the ad-free version) or by watching a promotional video.