How does airspace work with the navy?
There are a few factors and it may also depend on the relations of the nations.  

If the aircraft is unarmed and simply surveilling it may be covered under the open skys treaty. This is largely about overflying other nations territories but presumably applies to over flying marine areas as well.

If the aircraft is armed and potentially making a move to attack the fleet may respond by intercepting. This is more or less the plot of Top Gun.

If the aircraft hails from a friendly nation, they may attempt to contact them and may interrogate their IFF system