Avoid areas that attract sharks. Drop offs, river mouths and seals all attract prey that, in turn, attract sharks. Also be aware of how the fish near you behave. Fish and turtles that behave erratically may be aware of a shark in the area.
Swim in groups and in clear waters. Sharks tend to prey on solitary creatures, and being alone puts you at risk. In mucky waters, a shark may mistake you for a seal or other food.
Use an underwater chemical repellent. Two types of repellant are available. Electropositive metal spray creates a voltage that interferes with sharks' ability to find prey. Semiochemical sprays imitate the chemical released by a dead shark. The company SharkDefense recommends spraying the repellant to create a safe perimeter and deter sharks from approaching in the first place.
Stay calm. Sharks are naturally curious. Sometimes they bite to determine what something is and then swim on. A single bite does not mean that the shark will continue to attack you.
Punch it in the nose. When a shark is dangerously near, you may be able to scare it off. Sharks have sensitive noses and are not accustomed to prey fighting back. Ideally a good jab to the snout will surprise the shark, convincing it to move on.
Claw at the gills and eyes. If all else fails and you are under attack, fight back. Similar to the nose, the gills and eyes are sensitive. Focus on these areas and let the shark know that you too are powerful and dangerous.