Scotland in 1602 was an independent kingdom. The Scottish people, via the Church of Scotland, had imposed restrictions on what their monarch could do. The future James VI had been baptised in the Catholic faith, but when the Protestant nobility in Scotland forced his mother (Mary, the queen of Scots who was executed by England's Queen Elizabeth in 1587) to abdicate, James was raised in the Church of Scotland, and came under the influence of his preceptor, George Buchanan, who certainly believed in trammelling the power of the Scottish monarch.
All this changed in 1603, when James VI of Scotland became James I of England, on the death of Queen Elizabeth. James traced his ancestry back to Henry VII of England, who was Elizabeth's grandfather. This is known as the Union of the Crowns. Scotland theoretically remained an independent monarchy, with a parliament and justice system distinct from the English one. However, what it did not have was an independent foreign policy. Ambassadors addressed the same person, whether they went to London or to Edinburgh. A 'British' foreign policy emerged straightaway, with the ending of the Anglo-Spanish War that had been going on for some twenty years, and which previously the Scots had stood apart from. He also secured the end of the Nine Years' War in Ireland which, however, had petered out without his direct involvement. He simply swept up the pieces. Given the nature of seventeenth-century monarchies (and even earlier ones) it could not be any other way. (Although, interestingly, colonisation in the Americas remained two distinct projects.) The monarch pursued the best advantage for all the realms under his or her rule. And this is at the root of the basic problem with a 'union of crowns'. Those Crowns can eventually fall onto separate heads, as would happen when Queen Victoria ascended the British throne, but that of Hanover was occupied by a man. The Hanoverians followed Salic Law, which did not permit a woman to be monarch.
And it was this that lay at the root of the next development. James had been quite keen to see the merger of England and Scotland, but some English and many Scots preferred otherwise. The two parliaments, the two churches and the two legal systems continued to go along their separate ways, which contributed to the outbreak of the English Civil War in 1642, itself preceded by the Bishops' Wars, in which the King of Scotland, James VI's son Charles I, used his English realm to try and enforce his opinions on Scotland. However, with the Glorious Revolution of 1688, a salient moment in English constitutional history, the Union of Crowns problem emerged. In theory, James VII could have remained king of Scotland and king of Ireland*. He didn't because he lost wars fought there on his behalf. In 1692, the daughter of James VI and I, Sophia of Hanover, was made the heir of Anne, the Protestant daughter of James VII and II as queen of England and Ireland. Scotland would have to make its own decision.
And, it did. In 1704 the Act of Security proposed a separate, Scottish monarchy that would remain Protestant, but could not be identical with that of the English line of succession, now vested in Sophia. This dispute in turn led to the Acts of Union of 1707, which united the Scottish and English parliaments and the two kingdoms. The Kingdom of Great Britain would now be governed by means of a parliament at Westminster. Scotland retained a separate church and a separate legal system. Foreign policy would go on as before, but economic policy would now be combined. Scotland remained an independent country, in one sense, in that it continued to exercise that independence through the Kingdom of Great Britain.
At its root, it is this which the referendum question is about. 'Should we undo the Act of Union of 1707?'. But I'm afraid it goes farther than that, based on what we have heard. Salmond has asserted that the Queen will remain head of state of an independent Scotland. But, in that case, she has to decide which realm will be her home, and which will require the appointment of a governor-general. Why? Because, fundamentally, the monarch no longer conducts a united foreign policy for all realms. In order to remain above politics, the monarch has to receive advice (which is basically a courtesy memo) from governments. In the case of, say, participation in the invasion of Iraq in 2003, the Queen of Canada, in the person of the governor-general, received different advice from the Queen of the United Kingdom. For Scotland, if the monarch should choose to reside in England, this would be something completely new. Scotland would have the same status as one of the Commonwealth Realms. So? Well, all those were formerly colonies of Scotland, through the Kingdom of Great Britain. In other words, Scotland would be in danger of demoting itself to ex-colonial status, in danger of asserting that in its previous existence it was not an independent country. This is constitutional nonsense. If Scotland is not an independent country now, than neither is England.
It seems to me that if Scotland wants to undo the 1707 Acts of Union, a 'No' vote is in order, to recognise that Scotland is already an independent country, through the United Kingdom. However, this must be followed by a demand from the Scottish Assembly to repeal or annul the acts. This, of course, could be the same process as after a 'Yes' vote, except that the 'Yes' vote as it stands inherently proposes that Scotland is a subjugated country, something that never happened. Subsequently, a new Act of Security could be passed, and Scotland could go its separate way without having undermined its previous status. It would, of course, remain a part of the Anglosphere.
Whatever the case, I'm clearly too historical to be an effective politician!
* I'm not going into Ireland's relationship to all this, which is an interesting story in itself.