Duke is the highest of the five ranks of the peerage, standing above the ranks of marquess, earl, viscount and baron.
The title duke is derived from the Latin dux, a leader. The title originally signified Sovereign status, for example William the Conqueror was Duke of Normandy, and it was not adopted as a peerage title until 1337, when King Edward III conferred the Dukedom of Cornwall upon his eldest son, the Black Prince.
Dukedoms were created in Parliament by the fastening of a ceremonial sword to a belt or girdle (cincture). This ceremony was traditionally used until 1615, when it was replaced by the conferring of letters patent under the Great Seal (peerage patents are always created by letters patent under the Great Seal, which represents the Sovereign's authority).
The first subject to receive a dukedom who was not a member of the royal family, nor one nearly related, was Sir William de la Pole, Marquess of Suffolk, who was created Duke of Suffolk in 1448.
A Prince of the Royal Blood is usually created a duke either shortly after coming of age or upon his marriage. The Queen's second son, Prince Andrew, was created Duke of York upon his marriage in 1986. Similarly The Queen's grandson, Prince William of Wales, was created Duke of Cambridge upon his marriage in 2011.
The Queen's youngest son, Prince Edward, broke with royal tradition when he chose the title of Earl of Wessex upon his marriage in 1999. Buckingham Palace announced that the Earl of Wessex will be granted the dukedom of Edinburgh when the title reverts to The Crown (the title will only revert to The Crown on both the death of the current Duke of Edinburgh, and the succession of the Prince of Wales to the throne).
The other royal dukes are The Queen's first cousins, the Duke of Gloucester and the Duke of Kent (both grandsons of King George V).
At present there are 24 dukes (not including royal dukes). The premier duke and earl of England is the Duke of Norfolk. His ancestor John Howard was created Duke of Norfolk in 1483, but because he inherited his dukedom through his mother, Margaret Mowbray, the duke's precedence (ie his seniority in terms of the antiquity of his title) is dated 1397, which is when Margaret Mowbray's father was created Duke of Norfolk.
The premier peer of Scotland is the Duke of Hamilton and Brandon (created 1643). The premier duke, marquess and earl of Ireland is the Duke of Leinster (created 1766). The most recent (non-royal) dukedom to be created is Westminster in 1874.
Since 1989 only one dukedom has become extinct, Portland (in 1990), but the Earldom of Portland continues and is currently held by Timothy Bentinck, who plays David Archer in BBC Radio 4's drama series 'The Archers'.