The Legend of Zelda/Analysis
The games in the series have been released in non-chronological order quite frequently. Shigeru Miyamoto and Eiji Aonuma have told the press that they have a "Master Timeline" document in their possession detailing how every game is connected. The document for the series has not been released, mainly due to Nintendo not wanting to Retcon things left and right when they change their mind about something or get new ideas.
However, it has been determined that several games are connected. Some of the games have direct sequels, such as Zelda II being the direct sequel of the original game and Majora's Mask being the direct sequel to Ocarina of Time. Most of the games which were released after Ocarina of Time usually reference it having taken place sometime in the past; and as it shows the origin of Ganon, the Big Bad, it marks the start of the main chronology. However, it is not the first game; Skyward Sword features the origin of the Master Sword and therefore predates Ocarina, and Minish Cap (which doesn't involve Ganon or the Master Sword) may take place prior to either one.
Word of God has confirmed that the series has a split timeline caused by Link's time travel during Ocarina of Time; these are referred to as the "adult" timeline (where Adult Link defeats Ganon and Hyrule is restored) and "child" timeline (where Link is sent back to his childhood by Zelda, where he gets the chance to nip Ganondorf's plot in the bud). The split leads into The Wind Waker, Phantom Hourglass and Spirit Tracks on the adult timeline and Majora's Mask and Twilight Princess on the child timeline. However, there is a lot of fan speculation about the timeline, resulting in frequent massive flame wars and an entire community dedicated to the Zelda timeline.
At the end of 2011, Nintendo released Hyrule Historia where an "official" timelne is released - and it includes three different paths. It's here. Of course, both Miyamoto and Aonuma admitted things did not line up exactly right.
Incarnations of the Characters
In spite of the various games taking place in many far-removed periods of time, every game features a character named Link, with characters named Zelda and Ganon(dorf) popping up almost as frequently. This Legacy Character system has been justified in-universe by having Link and Zelda being reincarnations of chronologically earlier versions of their characters. Ganon, however, has been confirmed to be the exact same incarnation in all his appearances; he has repeatedly been a Sealed Evil in a Can, so he's never had the opportunity to die and then reincarnate. There is a "multi-Ganon" camp which holds that Ganon is a different incarnation in each game, but it is very much a minority view.