"The Form" is the manner in which the members of the Royal Family and titled aristocracy are addressed and their names written. "The form" derives from Debretts, publishers of a series of books on manner of address, history and etiquette for titled and aristocratic families in Britain.
The House of Windsor
The Royal Family have no last name per se: the family are members of a royal house, Windsor. Under ordinary circumstances, the family last name would be Battenburg, Prince Philip's family name (later Anglicized as Mountbatten). As queen, Queen Elizabeth had the right to select a family name, and chose to retain the name Windsor, first taken by King George V in 1917 following anti-German sentiment in the wake of World War I. In some cases, members of the family will use their highest title as a last name: Prince Harry is Harry Wales when on military duty because his father's highest title is as the Prince of Wales. Prince William is now William Cambridge, as he carries the title Duke of Cambridge.
The Battenberg/Mountbatten Name
When a prince in the line of succession marries or in some cases, earlier in his life, he is typically given a series of titles: Prince Charles is now Duke of Cornwall (a title he was given in 1952) and Duke of Rothsay (given at the time he married Camilla Parker-Bowles). He also has a series of other titles, including Earl of Carrick, Earl of Chester and Baron of Renfrew. Similarly, there was great speculation as to the titles Prince William would be given just before his wedding: Duke of Cambridge, Earl of Strathearn, and Baron Carrickfergus. Generally, one title will derive from Scotland, and is used when the royal family member is there: Prince Charles is the Duke of Rothsay when in Scotland.
Princes with other titles, are referred to either as Prince (name) or Duke of (name); use of the ducal name is more common (again, see Prince William, who is now more often referred to as the Duke of Cambridge.) William's wife, Catherine is not a princess, but is the Duchess of Cambridge (never Kate Middleton, despite how the media persists in referring to her); her children Prince George and Princess Charlotte would use the family names George Cambridge and Charlotte Cambridge. Prince Edward chose to take the title Earl of Wessex rather than the customary Duke; his wife, Sophie is the Countess of Wessex.
Not all of the Queen's grandchildren have titles. Although Charles's and William's do (as first and second in line to the throne), and Andrew chose to retain Princesses Beatrice and Eugenie's titles, Princess Anne's children Peter and Zara, as female-line descendants of the Queen do not have titles and use their father's last name: Phillips. Prince Edward's children, are James, Viscount Severn and Lady Louise Windsor, as is customary for children of an earl.
When Princess Margaret married, the Queen created her husband, commoner Antony Armstrong-Jones, Earl of Snowden. Princess Margaret then took the title Countess of Snowden; her children used the titles David, Viscount Linley (or more informally, David Linley) and Lady Sarah Armstrong-Jones (now Lady Sarah Chatto). On the death of his father, David Linley became Earl of Snowdon, and his son Charles now uses the title Viscount Linley, while is daughter is Lady Margarita Armstrong-Jones.
How did the two notorious divorces and one re-marriage affect titles?
On her marriage to Prince Charles, Lady Diana Spencer, already the daughter of an Earl (and a member of a much older aristocratic family than the Queen's), gained the title Princess of Wales, and the style Her Royal Highness. Upon her divorce, Diana was no longer styled HRH, but somewhat controversially, was instead given the style Diana, Princess of Wales, and as the mother of a prince in direct line to the throne, continued to be considered a member of the royal family. Likewise, Sarah, Duchess of York, lost her style HRH, but retained the title Duchess of York. Although no longer a member of the royal family, Sarah continues to be given treatment as one when in the company of her children on rare official occasions. Should Sarah marry again, she will surrender the title Duchess of York.
When Charles remarried, it was agreed that his new wife, Camilla Parker-Bowles, would not adopt the title Princess of Wales given its close association with Diana, Princess of Wales. Instead, the Queen created Charles Duke of Cornwall, and Camilla, Duchess of Cornwall, the title she used; she also uses the style Her Royal Highness. When Charles becomes King, Camilla is entitled to the title queen consort, but instead will take the title Princess Consort.
Aristocracy work similarly. Aristocrats, such as the Earl of Mountbatten and Duke of Norfolk have family names, but do not use them once titled. The 16th Duke of Norfolk, who appears in the series, was born Bernard Marmaduke Fitzalan-Howard, but became Bernard Norfolk on the rare occasion he used a family name once he ascended to the title. On rare occasions, a new title may be a family name: Rear Admiral Louis Mountbatten was made up Earl Mountbatten of Burma by King George VI. (Mountbatten is the Anglicized version of Battenburg, the name Louis renounced when he became a British citizen, much like his nephew, Prince Philip.)
In some occasions, titled aristocracy will use their titles on official occasions, but not professionally. Among them are American actor Christopher Guest, also a British citizen, holds the title Baron Haden-Guest, but continues to work using his family name. Guest uses his title on rare occasions, such as the 1998 State Opening of Parliament, accompanied by Lady Haden-Guest, better known as actress Jamie Lee Curtis. Similarly, Timothy, Earl of Portland is best known as the radio and voice actor Tim Bentinck, where he retains his family name; although he sits in the House of Lords, Bentinck does not use his title.
(Note: the Wikipedia gets this wrong. Don't rely on them!)