So often in Scottish history, the problems arise because of a too young monarch. In this case, it was Queen Mary who was only an infant.
Scotland was Catholic; and so was its Regent, Mary of Guise (pictured), mother of Mary, Queen of Scots. She was also French, and a member of the powerful de Guise family in Lorraine. As a result, most of her ministers were men shipped over from the homeland, rather than the traditional Scottish nobility.
This did not go down well.
Moreover, her daughter, the Queen of Scotland, was now married to the French Dauphin. She would also become Queen of France. This did not bode well for the future.
There were Protestants in Scotland before all of this, and they were growing in number sufficiently to cause some alarm in the early 16th century. Lutherans had been burned at the stake as heretics; and their prayer books were banned.
Mary, Queen of Scots, had become betrothed to the future King of France because of Henry VIII of England's 'rough wooing'. He had wanted Mary married to his own son, Edward. When that was rejected on religious grounds (Henry VIII had broken with the Catholic church), the response from England was to attack.
Whole regions of south-east Scotland were devastated by the English armies (swelled as they were with German and Spanish mercenaries). The Battle of Ancrum Moor brought an end to it, with a Scottish victory, but it felt temporary to Mary of Guise. She sent for help from France and it arrived. But in return, she had to agree to her daughter marrying the future Francis II of France.
Scotland's tiny queen was packed off to be raised in France. The Scottish nobility despaired of ever regaining their traditional positions, in the government of their own country. Anti-French feeling ran high.
The Scottish Reformation did not happen overnight. It took until the reign, in England, of Queen Elizabeth I for boiling point to be reached. In order to break the dominance of France over Scotland, some nobles looked to England for assistance.
For a while there, in 1559-1560, both English and French troops had congregated in Scotland. A peace treaty was eventually agreed upon, which provided concessions for each side.
All that the English really wanted was the ability to choose Scotland's Parliament - which looked, to onlookers, precisely what the Scottish nobility wanted. It kept the French out of power there. Neither the Scottish nor French negotiators saw what was coming.
As soon as the ink was dry on the Treaty of Edinburgh, England installed a totally Protestant Parliament in Scotland. It kick-started the Scottish Reformation, which side-lined, then persecuted the Catholics in the country. It forced Mary, Queen of Scots to abdicate; and it ensured that her son, James VI of Scotland, I of England, was raised as a Protestant.
English policy had now not only secured its language and administrative ways in Scotland, but now its religion too. Moreover, this was at odds with the spiritual beliefs of the majority of Scots alive at the time!