The shark terrorizes Michael and Sawyer while they were adrift at sea after their attack from "The Others".
While Michael and Sawyer were drifting out at sea after their attack by the "Others" and the abduction of Walt, the two floated together on a piece of the raft and were suddenly attacked by a shark. When Sawyer spotted one of the pontoons from the raft, he decided to swim for it, Michael was given the gun and told to fire if he saw the shark. When it appeared, Michael fired several shots at the shark, one of them made it's mark, killing it.
It should be noted that branded onto the fin of the shark was a logo from one of the corresponding branches of the DHARMA Initiative.
In the Lost Podcast, Damon and Carlton jokingly refer to the shark as "Ezra James Sharkington."
In the timeline where Oceanic 815 never crashes, the shark is seen swimming around the four-toed statue on the now-sunken island.