These currents are formed by surf and gravity. Once surf pushes water up the slope of the beach, gravity pulls it back. This can create concentrated rivers of water moving offshore. Some people mistakenly call this an undertow, but there is no undercurrent, just an offshore current.
If caught in a rip current...
If you are caught in a rip current, don't fight it by trying to swim directly to shore. Instead, swim parallel to shore until you feel the current relax, then swim to shore. Most rip currents are narrow, and a short swim parallel to shore will bring you to safety.
The following guidelines are useful when trying to escape a rip current:
Remain calm to conserve energy and think clearly.
Never fight against the current.
Think of the rip current like a treadmill that cannot be turned off. Your attempt to get out is like stepping to the side of the moving belt of the treadmill.
Swim out of the current in a direction following the shoreline. When out of the current, swim at an angle - away from the current - towards shore.
If you are unable to swim out of the rip current, float or calmly tread water. When out of the current, swim towards shore.
If you are still unable to reach shore, draw attention to yourself by waving your arm and yelling for help.
Another water condition to be aware of is shore break. Shore break occurs when the waves crash in shallow water close to the shoreline.