Bounty
The bounty system allows players to place credits into a pool, one for each player. Pirates will then choose the player with the highest bounty added against them and attack that player. With just two players it is merely how much you do or do not want to spend and who has the most credits as to who the pirates attack. Of course, with more players, it is an economic battle to see who gets stuck with all the bounty on their head.
Not having the most bounty on your head is a good thing. If you are the chosen target, due to having the greatest bounty on your head, the pirates will likely attack a system you own nearest their base. More often than not, these assault fleets are dangerous, but far from impossible to defeat if you have a capital ship and some static defenses.
Related Research
There is also civic research that can be undertaken that adds a percentage bonus to your placed bounty. e.g. the button adds 500 credits to the bounty pot and you have a level of the research required, and it adds another 8% on top. Thereby putting 540 credits into the bounty only costing you 500.