The most important thing to do when encountering a shark also happens to be one of the most difficult things, staying calm. Panicking around a predatory shark is akin to ringing a dinner bell, signaling that you are prey and that you are trying to escape.
Sharks have a powerful sense of smell which they use to track prey over vast distances, however, their eyesight is comparatively poor. The main tool sharks use to find prey at close range is a specialized organ in their noses known as Ampullae of Lorenzini, which are sensory organs able to detect the tiniest movements in the water around them.
A frenzied reaction to their approach will be easily sensed by the shark using these organs, making the likelihood of attack far greater.
Your number one goal is to get back to shallow water as quickly as possible without panicking and splashing around. Moving slowly backward from the shark in a very controlled and deliberate way is the most effective method of escape without provoking an attack. Trying to stay facing the shark to observe its movements is important as you continue to back away.
In the event of an attack, it is advised to try and poke the shark’s eyes, place a hand in the gills or punch the nose of the shark in order to force it to back off or release you if it does bite.