It's pretty complicated. The crash and all the stuff on the island happened. What we've seen throughout season 6 and thought was an alternate time line, was actually Purgatory. A place where Jack had to get together with the people from the most important time of his life (on the island) before he could move on.
Lots was not explained and part of me feels frustrated by this. However, the writers did say that the story is about the characters and the relationships they develop in the situation they are in. Some of the scenes at the end were pretty moving and a fitting way to bring closure. Personally I'd like to have seen more explanation about the islands existence and the things that made it special.