Playing in the ocean is so ingrained as a fun summer activity that few of us seriously consider how really dangerous it can be.

Unfortunately, it takes something like the drowning last weekend of two visitors to Atlantic City to snap us out of vacation mode and remind us that lifeguards and warning signs are there for good reason.

Samuel Jackson, 21, of Massachusetts, and Thewinco Caesar, 22, of Pennsylvania, were among a group swimming Saturday evening at a beach that was posted as a danger area. They were pulled out of the water by the Beach Patrol but were later pronounced dead at the hospital. It appears Jackson got trapped under a drainage outfall pipe.

Their deaths are tragic, but their situation is not all that unusual. Atlantic City lifeguards made 47 additional rescues that day and have made 1,112 since Memorial Day. Multiply that by all of the beaches along the East Coast, and you have thousands of potential deaths averted each summer.

Researchers at the University of Delaware are investigating what leads to injuries on the beach and are finding that human behavior plays a huge role. The study was triggered by Dr. Paul Cowan at Beebe Medical Center in Lewes, Del., who noticed that some days there were no beach injuries, but on others as many as 25 such injuries would arrive at the emergency room. Over a three-year period, more than 1,000 injuries were reported on five Delaware beaches.

Wendy Carey, an expert in coastal processes and hazards with the Delaware Sea Grant program, said many people don't understand that swimming in the ocean is different from a pool or a pond. There are waves and undertows and rip currents to deal with. She advises swimming only at guarded beaches and checking surf conditions with lifeguards before swimming.

"The current can grab somebody, a hole can form in the sand," said Atlantic City Public Safety Director Will Glass, a former lifeguard. "These things happen in seconds."

The beach where the two visitors died is considered one of the most dangerous in Atlantic City, but it is also popular. Peter Medina, a summer resident who uses the beach regularly, said people routinely ignore the danger signs and the lifeguards.

In 2012, a 10-year-old drowned at an unguarded Atlantic City beach at 7 p.m. Several city beaches have since extended lifeguard hours. But lifeguards can't be on duty 24 hours a day, and even when they are, there is no guarantee they can reach a struggling swimmer in time.

Ultimately it comes down to each of us recognizing the risk.

It's fun to play on the beach. But please, play it safe in the ocean.