@Ragnell804 here is the rule from page 10:
Defending submarines may submerge instead of firing back. The sub is turned on its side to indicate this submerged condition. It remains on its side and may not attack or be attacked again this turn. Submerged subs are returned to their upright position in Action Sequence 6. Note: Submarines are the only defending units in the game that may withdraw from battle.