It's summer and every year too many beach-goers tragically die unnecessarily after being sucked into rip currents.
Remaining calm is the number one key to survival.
Rip currents, pull you out to sea not under. Rip currents can run much faster than the strongest Olympic athlete can swim.
They will not drag you under, they will simply carry you out from the shore for a few minutes then dissipate
You have the options of swimming parallel to the shore if it is easy, or floating out to where the current dissipates.
If you remain calm and do not fight the power of the ocean you will be able to eventually and easily move out of the current and slowly calmly scull your way floating towards shore.
Maybe you won't return to the same exact spot on the shoreline you left from , but that ok. Like pilots say, any landing you walk away from is a good one.
On the Florida East coast you can see rip currents from the shore line and incoming currents as well.
We used to use outgoing and incoming tidal rips for beach scuba and snorkel dives out to wrecks depending on timing and tide states.