When does a shark attack a person?

sharks usually attack in murky water. so its best if u don't swim at dawn or dusk.. sharks also attack surfers because they look like seals. which is their main meal..