OCEAN WATER IS ALWAYS MOVING
This is a fact you must take on faith. No matter how calm the surface may appear, the water beneath is never still. It is moving in three directions: back and forth along the shore, in and out from the beach, and up and down along the slope of the shelf of the beach.
Water is driven constantly by wind, tides, and currents, and by local factors like channels, jetties, and points of land. The presence (or absence) of reefs, shoals, and sandbars will change water's motion. Prevailing winds will drive surf onto certain beaches and leave others to be lapped by little but the tides.
If you intend to swim in the ocean, it makes sense to stand for a moment and study what the water is doing that day. The wind will be pushing waves onto the beach. Since winds rarely blow directly at a beach, the waves will strike the shore at an angle. This causes a current called a set or a drift that moves the water in a particular direction.
Look at swimmers already in the water or at pieces of wood or seaweed floating on the surface. Note which way they're moving and how fast. That will tell you how strong the drift is and how quickly you'll be carried away from the point where you enter the water. The stronger the drift, the closer you should stay to shore. If the drift is strong, carefully plan where you want to exit the water, because here is another fact of ocean swimming: You Cannot Swim Against a Strong Current. If you try, you will exhaust yourself. You could start a chain of events that may lead to disaster: fatigue, gasping, breathing water, choking, panic, struggling for air, waving or calling for help, sinking, and, finally, drowning.
If you want to come out of the water near your blanket, your soda, and your can of Pringles, walk up the beach in the opposite direction of the drift. Enter the water, and let yourself float down the beach until you reach your exit point. Then swim gently across the drift toward shore. Otherwise, be prepared to float away from your home base and walk back when you're finished swimming. Under no circumstances should you try to swim against the current.
There are a few naturally occurring phenomena that can sometimes (but not always) be seen from the shore. They can be deadly but don't have to be. You can anticipate them just by being aware of them, whether or not you see them coming.