Some sharks are attracted to human blood if the human is bleeding in the water.
However usually some sharks will avoid humans unless they see you as a threat to them.
Not all sharks will harm humans or want to attack humans and some sharks are more fearful of humans than humans are fearful of them.
Still it's best to be very cautious around sharks and if you do see a shark in the water you should do your best to quickly get away from the sharks and get out of the water.
Sharks can detect human blood and any other blood that is in the ocean but not from many miles away.
Also sharks do have a pretty good sensitive olfactory system and a very good sense of smell which is even better than humans.
So do be cautious around sharks because they can and do attack people.