Some form of organization of builders, according to the oldest Masonic document, the Reguis poem, existed early as A.D. 926. Freemasonry, as distinguished from any other organization of practical builders, probably began among the Cathedral builders of the middle ages--tenth or eleventh century. The first Grand Lodge came into existence in 1717. Freemasonry in the United States dates definitely from 1730 and probably earlier.
Another real easy question to answer. The modern system of Masonic governance, the Grand Lodge structure, started in London, England in 1717. Little is known of any Lodges in England prior to that time with only one real instance in 1646 at Warrington when Elias Ashmole became a member.
Written records of Lodges in Scotland go back to 1598 and there are many records from the 17th Century.
Before the written records, there is nothing but theories and speculation, which has provided much enjoyment for Masons and non-Masons in their research of Masonic roots.
The theories are varied but the main ones are that modern Freemasons:
* are derived from the Operative Masons of Medieval times;
* developed from the Masonic Guilds (Trade Unions);
* created by the Knights Templar to hide their secrets;
* came out of the Royal Society;
* Royal Society developed from Freemasonry;
* derived from the Ancient Mysteries of Egypt;
* started at the Tower of Babel;
* held ancient secrets which were kept hidden by cloisters of monks until it was safe to show them;
* Shakespeare wrote it all;
* there was nothing before 1717 and a group of people just formed the Freemasons;
ALL are theories and NONE are proven (or disproven).
What we really need is a time machine!
snippets taken from GL of Alberta site and working-tools.com