The current royal family took its name when King George V by royal proclamation on the 17 July 1917, changed the the name of his family from the German Saxe-Coburg and Gotha to the English "Windsor". This was due to the rampart anti-German nationalism of the first world war era which reached its zenith when German blimps bearing the name Gotha G.IV began raining bombs on London.
The declaring was "Now, therefore, We, out of Our Royal Will and Authority, do hereby declare and announce that as from the date of this Our Royal Proclamation Our House and Family shall be styled and known as the House and Family of Windsor, and that all the descendants in the male line of Our said Grandmother Queen Victoria who are subjects of these Realms, other than female descendants who may marry or may have married, shall bear the said Name of Windsor."
The Royal Family name of Windsor was confirmed by The Queen after her accession in 1952. However, in 1960, The Queen and The Duke of Edinburgh decided that they would like their own direct descendants to be distinguished from the rest of the Royal Family (without changing the name of the Royal House), as Windsor is the surname used by all the male and unmarried female descendants of George V.
It was therefore declared in the Privy Council that The Queen's descendants, other than those with the style of Royal Highness and the title of Prince/Princess, or female descendants who marry, would carry the name of Mountbatten-Windsor.
This reflected Prince Philip's surname. In 1947, when Prince Philip of Greece became naturalised, he assumed the name of Philip Mountbatten as a Lieutenant in the Royal Navy.
The effect of the declaration was that all The Queen's children, on occasions when they needed a surname, would have the surname Mountbatten-Windsor.
For the most part, members of the Royal Family who are entitled to the style and dignity of HRH Prince or Princess do not need a surname, but if at any time any of them do need a surname (such as upon marriage), that surname is Mountbatten-Windsor.
The surname Mountbatten-Windsor first appeared on an official document on 14 November 1973, in the marriage register at Westminster Abbey for the marriage of Princess Anne and Captain Mark Phillips.
A proclamation on the Royal Family name by the reigning monarch is not statutory; unlike an Act of Parliament, it does not pass into the law of the land. Such a proclamation is not binding on succeeding reigning sovereigns, nor does it set a precedent which must be followed by reigning sovereigns who come after.
Unless The Prince of Wales chooses to alter the present decisions when he becomes king, he will continue to be of the House of Windsor and his grandchildren will use the surname Mountbatten-Windsor.