From Coastal Wiki
Definition of Undertow:
Undertow is the current flowing offshore near the seabed in the surf zone, driven by the cross-shore wave set-up gradient
This is the common definition for Undertow, other definitions can be discussed in the article
The offshore water discharge due to the undertow current is compensated by the onshore directed wave-induced mass transport and roller transport in the upper layers of the water column. The turbulent frictional dissipation of momentum by the undertow current is dynamically related to radiation stress decay.