ATTACKS OF OPPORTUNITY

Attacks of opportunity work differently with starships than with characters.
A starship can only make an attack of opportunity if it is equipped with a point-defense system (see Starship Defense Systems). A starship can use its point-defense system to make an attack of opportunity against an enemy ship that enters or passes through its fighting space (any square it occupies on the battle grid) or any adjacent square.

THREATENED SQUARES

A starship equipped with a point-defense system threatens the squares it occupies (its fighting space) and all adjacent 500-foot squares. It can therefore make attacks of opportunity against enemy ships that enter or pass through its fighting space or any adjacent square.
A starship without a point-defense system does not threaten ships that enter or pass through its fighting space or adjacent squares.

PROVOKING AN ATTACK OF OPPORTUNITY

Two actions can provoke attacks of opportunity: moving out of a threatened square, and performing an action within a threatened square that distracts the pilot and forces her to do something other than evade incoming fire.
Moving Out of a Threatened Square: When a starship moves out of a threatened square, it generally provokes an attack of opportunity. There are two important exceptions, however. A starship doesn't provoke an attack of opportunity if it limits its movement to a single 500-foot shift or if it withdraws (see Withdraw).
Thus, if the square a starship occupies at the beginning of its turn is a threatened square, any movement it makes provokes an attack of opportunity (unless it withdraws or limits it move to a single 500-foot shift). If it doesn't start in a threatened square but moves into one, it must stop there, or else it provokes an attack of opportunity as it leaves that square.
Performing an Action that Distracts the Pilot: Some actions, when performed in a threatened square, provoke attacks of opportunity because they make the pilot divert her attention from the battle at hand. Firing a starship weapon in a threatened square does not provoke attacks of opportunity, but Table: Starship Actions notes actions that do.

MAKING AN ATTACK OF OPPORTUNITY

An attack of opportunity is a single attack made with a ranged starship weapon. A starship can only make one attack of opportunity per round. It doesn't have to make an attack of opportunity if it doesn't want to.
An attack of opportunity is made using the starship's normal attack bonus-even if it's already attacked in this round.