A young man who had dug a large hole on a beach in Half Moon Bay, California, was buried under 4 feet of sand when the hole collapsed on him. Despite frantic attempts to dig him out, he died.

Teenager Matt Mina, who was buried under 6 feet of sand while trying to connect some tunnels he had dug on another beach in California, was luckier: He was freed by lifeguards and bystanders before it was too late.

“I thought I was going to die,” he told reporters afterwards. “I was just really scared. I didn’t know if anyone could hear me when I was screaming for help.”

The seemingly innocent pastime of burying people in sand can also be dangerous if someone gets trapped below the tide line. Experts now advise against burying someone in sand. Discovery Channel’s MythBusters recently pointed out that as someone buried in wet sand tries to wriggle free, the water transports more sand into the gaps. Sadly, the old pirate torture of burying someone in beach sand below the tide line really did work.

Burying people in wet sand and digging giant holes are definitely things to avoid when you go to the beach this summer. Most of the hazards, though, have to do with the water.

“The ocean bottom and the ocean water is dynamic, changing and moving. Unlike a pool or a lake where it’s stagnant, if a person gets just a little into the water, he could be moved into a situation where he would have to swim,” says Jason Young, chief of Orange County Lifeguards in California. “So the first tip would be know how to swim. And if not, stay away from the water’s edge.”

This summer when you go to the beach or seashore, protect yourself and your family by showing your ocean smarts.

Related: A Day at the Lake? Avoid an Ocean of Trouble

Dangerous conditions: Heed the flags 

One way you can protect yourself is to talk with lifeguards about the current water conditions, and to learn how to read beach warning flags. 

Flag meanings vary by region, but in general, green means mild conditions, though larger waves and rip currents are possible. Yellow signifies moderate hazards, with frequent large waves and possible rip currents. Red means high hazards, with powerful waves and currents (only expert swimmers should be in the water).

In some jurisdictions, a pair of red flags means the beach is closed. A dark blue or purple flag means the presence of hazardous marine life such as jellyfish. And a black circle on a yellow flag signifies hazardous conditions for surfing.

Rip currents: Learn how to save yourself 

Rip currents are fast moving, narrow channels of water and can drag you out to sea if you're stuck in one. “Rip currents are the leading cause of rescue scenarios and drownings,” says Young.

What to do if you’re caught in a rip current? First, don’t fight the current. “Panic is the leading cause even for people who are good swimmers to lose their energy and get into trouble,” says Young. Instead, float on your back and calm down. Once you get your bearings, swim parallel to shore until you escape the rip current. Than angle away from the current and swim toward shore. 

Related: How to Survive a Rip Current

Longshore currents: Don't get carried away 

The same surf that produces a rip current also produces a longshore current that runs parallel to shore. Usually escaping a longshore current is as easy as swimming to shore. But even longshore currents can be dangerous. They can carry poor swimmers, especially children, into slightly deeper water where they can’t touch bottom. They can also carry unwary swimmers into piers, jetties and similar hazards.

For this reason (and others), experts advise keeping children and poor swimmers in life jackets, close by and in your sight at all times. Also, regardless of currents, jetties and piers are hazardous places to swim. Stay at least 500 feet away from them. Pick a spot on the beach as a reference point so you don’t get inadvertently swept toward a pier by a longshore current.

Silent drowning: Not like Hollywood

Be aware that drowning doesn’t look the way it does in the movies, with lots of arm-waving, splashing, and yelling. It’s often almost entirely silent. Signs of drowning include gasping, bobbing up and down repeatedly, and seeing someone’s mouth at the surface of the water or arms spread out near the surface of the water.

Shore-break surf: Dangerous to kids and body surfers

Some surf breaks gradually over a long distance. That’s the kind surfers like. Shore-break surf, on the other hand, forms as incoming waves reach an abrupt change in depth and expend all their energy crashing into shallow water. And if you happen to be standing or swimming there, it will pound you into the sand as well. Warn your children never to turn their backs on the waves.

Body surfing or body boarding can also be hazardous in such conditions. Says Young, “You don’t ever want to air drop down the face of a wave head first.” Neck and back injuries are common at so-called shore-break beaches. If the waves are breaking over rocks, they become even more dangerous.

Rocks, jetties and reefs — oh my!

Cliffs, rock outcrops and jetties may be interesting places to explore, but they also pose dangers. Wetness or pools of water on the surface are signs that large waves have recently crashed over the surface. Stay away so you don’t get swept away.

“People tend to want to climb out and explore those areas. They are very susceptible to breaking waves and tidal changes,” says Young. Big waves can “smash you pretty good into the rocks or sweep you off into deeper water.”

Don’t dive from rocks because it’s difficult to know how deep the water is. Finally, don’t swim around submerged rocks, because currents and breaking waves can throw you into the obstructions.

Rising tides

Don’t forget about tides when you’re exploring a beach. Rising water can strand you on outcrops or jetties. Young says people often explore remote beaches at low tide only to discover that a rising tide has cut off their return because a cliff or series of outcrops stand in their way: “On their way back they discover there is no longer a safe route for them to return.” Consult the lifeguard or a tide table to learn when the tide will be coming in.

Boats, surfboards and jet skis

If swimming at an unguarded beach (always a bad idea), be aware that you may be sharing the water with surfboards, boats and jet skis. Keep an eye out, or better yet, find another spot to swim.

Sea creatures

Everyone worries about shark attacks, but they are very rare. The best ways to avoid them? Don’t swim beyond the first sandbar, stay in groups, keep out of the water if you have a cut or are menstruating (sharks are attracted by the smell of blood), and avoid bright-colored swimsuits and shiny jewelry (the latter of which looks like fish scales to a shark).

Related: Quiz: How Much Do You Know About Sharks?

Other marine life poses more common hazards. Jellyfish (and even jellyfish fragments) can sting. Stingrays can jab your foot with their tail and cause excruciating pain if you step on one. Spikes of sea urchins can puncture your foot. Even seals and sea lions can be aggressive at times. Ask the lifeguard what to watch out for, wear aqua booties to be safe, and seek medical help if you’re stung or bitten.

Sun: Don't get burned

Of all the hazards of spending time on the beach, none is perhaps as commonplace and overlooked as overexposure to sun. Sunburn hurts, but it can also increase the chances of skin cancer. Ultraviolet rays can also damage the eyes. Especially if you’re light skinned, wear sunscreen, a hat, and sunglasses. And don’t ignore the possibility of dehydration and heat exhaustion when you’re playing on the beach on a hot day. Drink plenty of fluids — sip water a couple of times an hour, even if you’re not thirsty.

Related:  Test Your Summer Sun Smarts

Greg Breining is a Minnesota-based journalist who writes about science, travel and nature for national and regional magazines, including Audubon and National Geographic Traveler. His books about the natural world include Wild Shore and Paddle North.