Attacks can happen in different ways. Attacks by or on Crew members are referred to as Frays, and work in one way, while attacks by ships on ships work leads to Combat at Sea which works differently.
"Attack" is also one of the types of six-sided dice used in the game. They are used when Crew members attack or defend, and also when players perform Artillery attacks on enemy ships. The Attack dice have four possible outcomes: Damage, Critical Damage, Omen and blank.
Combat
Combat can occur in a few different ways, depending on whether it's combat between ships or not, and depending on whether the combat was triggered by a player or by an enemy.
Combat between ships can be triggered by players using Artillery Orders. In those cases, decide which Artillery Card to use, check the range indications on the card to confirm that the target is in range of the attack, confirm that there is Line of Sight, and check what dice value the attack has. Then roll that many Attack dice, and apply the results: the enemy ship gets one damage (use Trauma markers to track damage on the enemy ship's card). You can choose to spend any type of Fresh Order token to convert "Omen" outcomes on the dice to "Damage" (one token per die to convert).
Combat between ships can also be triggered by the enemy, when the enemy ships move in the Enemy Phase. In this case, collect Enemy dice equal to the enemy ship's dice value, and collect one Evasion die for each Crew member that is manning a Navigation Node on the player ship. Roll all the dice. For each successful Evasion dieroll, cancel one enemy damage, then apply the remaining Damage to the player ship. You can choose to spend any type of Fresh Order token to convert an "Omen" outcome on Evasion dierolls to "Evade" (one token per die to convert).
Note: when using the "optional advanced mechanics" described on page 34-35 in the rulebook, Boarding is available as an alternative way of attacking enemy ships.
When an enemy ship is destroyed, you collect loot by rolling the Fate Die and getting loot according to the Spoils table. Do this as many times as the current Act number; so for example, you roll twice if it's Act II. (The rulebook has a misprint in regard to this, suggesting the loot is described on the ship enemy card, but this is not the case. The game designer has confirmed that this is a mistake in the ruleebook, and that rolling for Spoils is the correct procedure.)
Combat between Crew members and On Deck enemies are called Frays, and work differently.