If my carrier is sunk and it has 2 fighters on it do the fighters get a chance to defend or do they have to find a place to retreat to.
That depends on the situation:
If only enemy submarines are attack and your carrier was hit by one of them during a surprise attack (where there’s no friendly destroyers present - your fighters can’t hit submarines without them), then your fighters can move 1 space to land on an adjacent friendly space (territory, island or carrier).
If there are enemy subs and you have a friendly destroyer then your fighters will always fire back.
If there are other enemy naval units present other than subs (destroyers, battleships, etc.) then your fighters will always fire back.
Finally, if the enemy units retreat and your fighters are still alive they also have the 1 move to a friendly location after all combats are resolved.