Don't swim in the ocean. Ninety-nine percent of all shark attacks take place in exceptionally large bodies of water also known as oceans. The way to determine if you are currently in an ocean is to taste the water, which should be salty.
Listen out for the music. In the event that you are foolish enough to swim in an ocean, listen carefully for the music, as demonstrated in the marvellous documentary film Jaws. All shark attacks are preceded by the "daah-da, daah-da" chords, which will gradually become more rapid as the shark gets closer. This is due to the Doppler Effect.
Swim with fat people. Try to surround yourself with more appetizing companions. If you know them well, you might even try to switch their suntan lotion with A-1 Steak Sauce. This will definitely improve your odds. Don't go into the water without a knife. This is not to defend yourself but to stab the person (a.k.a the decoy) closest to you in the case of a shark attack. Once you are sure the "decoy" is bleeding profusely.....swim for your freakin' life. And finally... Don't panic. In the event that a shark actually bites you, try to remain calm. This really wont help you survive, but everyone else on the beach will appreciate you not shrieking madly, as this is quite unsettling and can really spoil a wonderful day out. Remember, it's not always about you!