You’re at the beach for a weekend with family or friends. Splashing and jumping, dunking your head beneath the waves, you start to cool off. Then you feel something soft brush against your leg—and suddenly, the coolness is replaced by a hot, shooting pain. You’ve been stung by a jellyfish. But what do you do now?

First let’s take a look at exactly what’s happening to your leg. Jellyfish have special cells along their tentacles called cnidocytes. Within these cells are harpoon-like structures full of venom, called nematocysts. The nematocysts shoot out when triggered by touch and can penetrate human skin in less time than it takes you to blink.

Once the venom is injected into your skin, the pain, redness and blistering begin. One of the main causes of this discomfort is a type of protein called a porin found in the venom of all jellyfish—and in all their relatives, including corals and anemones, which together form a group of creatures collectively known as cnidarians. Angel Yanagihara, a research professor studying box jellyfish venom at the Pacific Biosciences Research Center at the University of Hawaii, explains that the porins in box jellyfish are fast-acting and “promiscuous:” they are indiscriminate and “will punch holes in all types of cells” including blood, skin and nerve cells. The complex concoction of these proteins varies (along with the stinging cell mechanism) from species to species, which is why we might only feel a small sticky sensation when we come in contact with some anemones, while a box jelly sting may cause a trip to the emergency room or even kill you.

So after you’re stung, you should pee on it, right? Or get someone else to? That’s what you’ve seen on TV—maybe you’re thinking of a certain incident from Friends. But don’t pull those board shorts off too quickly—urine can do a lot of things, but it doesn’t help the sting. It may actually make it worse.

That’s because pouring freshwater—including urine—on the area will change the composition of the solution surrounding the remaining cells and may actually trigger the release of more nematocysts and venom. Instead, experts suggest rinsing the area with saltwater to help reduce discomfort. Before you do any rinsing, however, remove any jellyfish tentacles that remain on the skin, as nematocysts on loose tentacles can continue to sting even after they are detached from the jelly. Making sure that sand stays clear of the wound is also an important task, but likely a difficult one while on the beach. In the case of a box jelly sting, it would be helpful to have Yanagihara nearby with the two treatments she has developed—or even better would be to make use of her preventive ointment before going in the water. Because these aren’t yet available to the public, putting vinegar on the affected area and seeking medical attention are the suggested treatments.

It’s good to have this information in-hand when you go to the beach just in case—though it’s unlikely that you’ll be stung. But that possibility could be on the rise if, as has been suggested, jellyfish numbers are increasing. A study from April 2012 in Hydrobiologia found increasing jellyfish populations in 62 percent of the regions analyzed, including coastal areas of Asia, the Black Sea and the Mediterranean Sea. “Our study confirms these observations scientifically after analysis of available information from 1950 to the present for more than 138 different jellyfish populations around the world,” said Lucas Brotze Brotz, the lead author of the study in a press release.

However, jellyfish are a difficult species to study: their life cycles aren’t well understood, and catching them by net is not a good option due to their fragile, gelatinous bodies. Because of this, sweeping claims about global changes in jellyfish populations are up for debate. Their historical numbers are largely unknown, making it hard to be sure whether jellyfish populations are increasing over the long term, or whether the increases we see are a part of natural population fluctuations or an artifact of more people reporting sightings. And there is evidence for these caveats: a different 2012 study found that the perceived rise in the number of jellyfish is actually the peak of a normal 20-year boom and bust cycle.

But if jellyfish are increasing globally, it is likely that human influences are the cause. Overfishing has reduced some jellies’ competition for food; increased nutrients running into the ocean create oxygen-depleted environments that jellies can tolerate better than other animals; and warmer water can help some species of jellyfish larvae to grow more quickly. Even jellies without a nasty sting can cause problems, clogging up pipes in nuclear power plants that use seawater to cool their reactors and pushing fish out of the ecosystem.

There still is much to learn about the fascinating and pulsing lives of jellyfish that can help to determine if their populations are increasing long-term. Scientists are making use of observant beachgoers, with websites where you can input your jelly sightings onto a map to generate global data on jelly populations. So if you do have the bad luck to get stung by a jellyfish, remember: wash it with salt water, not pee, and maybe pop your location into the map to help us all learn something from the experience.

Learn more about the ocean from the Smithsonian’s Ocean Portal.