Ship to Ship Battle begins when one ship attacks another. Each time an attack occurs, both the attacker and defender exchange hits.
If the attacker deals more damage than the defender, then that battle is considered a win. Winning battles grant more experience.
If you are currently in a Legion you may see an Elite/Boss Battles button on the battle tab sometimes. These are NPC Elites and NPC Bosses that have been shared by members of your Legion. Which NPCs you can see in the list is dependant on your Rank.
If you are currently in a Legion you will also see an Enemy Bases button on the battle tab. If have 100% Legion Loyalty, that is to say, have been with the legion more than one week, then you can participate in a base attack, which may reward you with Silver Badges, and for bases Level 4 or higher, you can raid the base after it is disabled, with the chance to receive a Base Crate.