Sharks are some of the largest fish in the oceans, and many species intimidate humans with their massive razor-sharp teeth. On the other hand, sharks aren't the man-eaters that Hollywood films like Jaws paint them to be.
Sharks don't purposely sniff out humans for snacks; instead, most shark attacks are entirely accidental. These massive fish don't have the best eyesight, and when we swim around in their natural habitat, we sometimes appear to them as prey that they commonly eat.
One of the best ways to avoid a shark attack is to listen to warnings around you. If a lifeguard at a beach says to leave the water, then you should probably do so. Local news channels may also advise areas of increased shark activity during the beach-going months, and you should head these warnings as well before putting on your bathing suit.
If you should ever be unfortunate enough to find yourself in a skirmish with a shark, you should fight for your life. They use their eyes and noses to sense the environment around them, so you could hit or jab their eyes and snout for a higher likelihood of getting away safely.