Here's a simple mission I just set up in the Persian Gulf.
The target was a group of SCUD vehicles on the Iranian coast, protected by AAA vehicles.
I also set up 2 Los Angeles submarines close to the Iranian coast. The one to the west of the target area was set up as an object group, the other was to the south and set as a naval fleet.
By the time I got to the target area both subs were pumping out Harpoons and there wasn't that much left for me and my wingman to hit.
Ships will do the same, engaging land and naval targets with guns and missiles as long as they're within range.
Here's a USN ship egaging a group of suspect dhows somewhere in the Persian Gulf