Rip currents are narrow, powerful currents of water that flow away from the shore. They can happen anywhere that waves occur, even on lakes. Rip currents exist on beaches everyday, but become stronger based on wave, tide, and beach features.
Rip Mechanics | Weather.gov
Rip currents form when waves break near the shoreline, causing water to pile up between the breaking waves and the beach. This creates a circulation with a net flow of water moving out to sea. The higher the surf, the more dangerous the rip current conditions can be in a given area. Rip currents move at roughly 1-2 ft/sec (~0.6 - 1.4 mph), which is faster than most swimmers, including Olympic swimmers, are able to swim.