Lost Summary

Everything that happened on the island, happened in real life. No one on the island was dead the whole time - they all survived the initial plane crash, etc. In the final episode, Jack died, Hurley became protector with Ben as his number 2, and everyone else who died on the island or elsewhere, died. Those who died without fulfilling their purpose (i.e. Michael) were doomed to forever be whispers on the island. Those who fulfilled their purpose (Jin/Sun, Sayid, etc.) were allowed to go to the Flash Sideways timeline after they died, where they searched for the truth and were able to right their wrongs, i.e. make the right decisions about their life that they should’ve made in the first place. Once they saw the truth/their past on the island/remembered it, only then were they ready to “move on” and come to the church.

via Lostpedia, though this has since been edited out of the entry for the final episode.