If say a captain was told to patrol a certain area would the ship be allowed to pursue a target for a long distance And a simple explanation of how captain were told to act in different areas like the Atlantic Mediterranean and pacific
I might be able to help with this if you can clarify your question a bit. Specifically:
*in which navy or navies?
*what type of ship or mission did you have in mind?
I'd say "close to none", at least for what concerns the Italian Regia Marina. Adm. Angelo Iachino, in his slightly-apologetic (yet interesting) book Il Tramonto di una Grande Marina, details just how much commanders were dependent on Supermarina - the [Italian] Royal Navy's war-time central command - for almost everything.
Unlike their British counterparts, who could enjoy a relatively large degree of operative autonomy, an Italian commander was bound to follow Supermarina's extremely punctilious orders almost to the letter; even requests for help had to be evaluated and then approved by the command. On top of it all the regime had forbidden the Navy to fly its own aircrafts, therefore, any request for (say) air cover would have needed to be sent to the command first, which would've then relayed it to the Air Force which, in turn, was often unable to assist or even deliver help.
[...] if a captain was told to patrol a certain area would the ship be allowed to pursue a target for a long distance
Absolutely not. That captain just had to stick to the orders he'd received and any change in plans had to be radioed to the HQ; undertaking a different course of action would have probably needed Supermarina's approval.