1. Hit the shark. If a shark is coming toward you or attacks you, use anything you have in your possession--a camera, probe, harpoon gun, sword, your fist, (but probably not anything bloody)--to hit the shark's eyes or gills, which are the areas most sensitive to pain.
2. Make quick, sharp, repeated jabs in these areas. Sharks are predators and will usually only follow through on an attack if they have the advantage, so making the shark unsure of its advantage in any way possible will increase your chances of survival. Contrary to popular opinion, the shark's nose (apparantly sharks have noses?) is not the area to attack, unless you cannot reach the eyes or gills. Hitting the shark tells it that you are a badass.