The Duchy of Saxe-Coburg and Gotha came into existence in 1826, following the death of the last Duke of Saxe-Gotha-Altenburg without male heirs. His lands were repartitioned among his Wettin relations. Duke Ernst I of Saxe-Coburg-Saalfeld took Gotha, and changed the name of his duchy to Saxe-Coburg and Gotha.
Ernst I's younger son was Prince Albert of Saxe-Coburg-Gotha, who became Prince Consort to Queen Victoria. After their marriage, it became the Royal House name of the British Royal Family until changed to Windsor by King George V in 1917.
Other members of the House of Saxe-Coburg-Gotha came to ruler in various other European countries. Ernst's younger brother, Leopold became King of the Belgians in 1831, and his descendants still rule. Ernst's nephew, Ferdinand married Queen Maria II of Portugal, and his descendants continued to rule Portugal until that country became a republic in 1910. Another scion of the family, also named Ferdinand became Prince, and then King of Bulgaria, and his descendants continued to rule until 1946. The current head of the House of Bulgaria is the former King, Simeon II, who goes by the name Simeon Saxe-Coburg-Gotha and since 24 July 2001 has been Bulgaria's Prime Minister. He is the first former monarch in history to get back into power by a democratic election.
As for the Duchy of Saxe-Coburg and Gotha itself, Ernst I died in 1844 and was succeeded by his elder son, Ernst II, who ruled until his death in 1893. As he died childless, the throne of the Duchy would have passed to the Prince of Wales, but he renounced the throne in favor of his younger brother, Alfred, Duke of Edinburgh. Alfred's only son, also named Alfred committed suicide in 1899, so when Alfred died in 1900, he was succeeded by his nephew the Duke of Albany, son of Queen Victoria's youngest son, who reigned as Duke Karl Eduard. Karl Eduard reigned until 1918, when the monarchy came to an end, and the duchy merged into the new state of Thuringia.
Contrary to common belief, Saxe-Coburg-Gotha was not the personal surname of either Prince Albert, his wife or their descendants. Neither in fact knew what their actual surname was, as it was never used by royalty, until a late 19th century inquiry launched by Queen Victoria to clarify just what her surname was. After an exhaustive search, her advisors concluded that Prince Albert's surname, and hence her own after her marriage, was in fact Wettin. Both Wettin and Saxe-Coburg-Gotha were changed to Windsor in 1917. However an Order-in-Council in 1960 again separated the Royal House and personal family surname of the monarch and her family. On that date it was decreed that while the Royal House name would remain Windsor, the descendants of Queen Elizabeth II and Prince Philip, Duke of Edinburgh, would be Mountbatten-Windsor.
Dukes of Saxe-Coburg and Gotha
Heads of the House of Saxe-Coburg and Gotha since 1918
Monarchs in the House of Saxe-Coburg-Gotha
Kingdom of Belgium
Kingdom of Portugal
Kingdom of Bulgaria
United Kingdom of Great Britain and Ireland
 Continued to rule as the House of Windsor until 1936.