Article snapshot taken from Wikipedia with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
Names in italics indicate that these people rank elsewhere—either higher in that table of precedence or in the table for the other sex. Titles in italics indicate the same thing for their holders, or that they are vacant.
Peers and their families make up a large part of these tables. It is possible for a peer to hold more than one title of nobility, and these may belong to different ranks and peerages. A peer derives his precedence from his highest-ranking title; peeresses derive their precedence in the same way, whether they hold their highest-ranking title in their own right or by marriage. The ranks in the tables refer to peers rather than titles: if exceptions are named for a rank, these do not include peers of a higher rank (or any peers at all, in the case of baronets). No exceptions are named for most categories, owing to their large size.
Gentlemen
Royalty, archbishops, et al.
Royal family
Precedence is accorded to spouses, children and grandchildren of the reigning sovereign, as well as children and grandchildren of former sovereigns.
The Prime Minister determines the order of precedence for Secretaries of State as part of the ministerial ranking (also known as the order of precedence in Cabinet).
Knights Companion of the Order of the Garter and Knights of the Order of the Thistle
The Prime Minister determines the order of precedence for Secretaries of State as part of the ministerial ranking (also known as the order of precedence in Cabinet).
Ladies and dames, et al.
Ladies Companion of the Order of the Garter and Ladies of the Order of the Thistle
"From onwards it has been the settled practice to place the male members of the Royal Family in the following order: the Sovereign's son, grandsons, brothers, uncles and nephews".
Legally HRH Prince James of Edinburgh according to the 1917 Letters Patent as a male-line grandchild of a monarch, but styled as the duke's son per his parents' wishes on their wedding day and the will of the Queen.
"in the outcome The Duke of Cambridge was not only placed in Garter's Roll above all the other dukes, but also above the Archbishop of Canterbury and the Lord Chancellor, despite his not falling within the ambit of s. 4 of the Act of 1539. This precedent has been followed in all subsequent similar cases."
The title of Prime Minister was used unofficially in the 18th and 19th centuries for the First Lord of the Treasury; it first received official recognition with a royal warrant of 2 December 1905, which assigned the Prime Minister precedence immediately after that of the Archbishop of York.
The speakership of the House of Lords was historically vested in the Lord Chancellor; following the creation of a separate office of Lord Speaker, its rank and precedence was established by a royal warrant dated 4 July 2006 as being immediately after that of the Speaker of the House of Commons.
When visiting the United Kingdom, cabinet ministers of foreign countries are given precedence immediately above that of their country's High Commissioner (if in the Commonwealth) or Ambassador (if not).
If the Master of the Horse holds a rank lower than a duke in the peerage, then by royal warrant dated 6 May 1907, he ranks next after the Lord Chamberlain.
The Marquess of Londonderry (Earl Vane and Viscount Seaham in the Peerage of the United Kingdom, Baron Stewart in the Peerage of the United Kingdom and The Marquess Conyngham (Baron Minster in the Peerage of the United Kingdom) was created after the Acts of Union 1800. They take precedence after earlier Marquessates of the United Kingdom.
Excepting The Earl of Snowdon, who rank higher as a member of the royal family.
Excepting The Earl of Rosslyn, who rank higher as Lord Steward of the Household.
The Earl of Limerick (The Baron Foxford in the Peerage of the United Kingdom), The Earl of Clancarty (The Viscount Clancarty in the Peerage of the United Kingdom, The Baron Trench in the Peerage of the United Kingdom), The Earl of Rosse, The Earl of Gosford (The Baron Worlington in the Peerage of the United Kingdom, The Baron Acheson in the Peerage of the United Kingdom), The Earl of Normanton (The Baron Mendip in the Peerage of Great Britain, The Baron Somerton in the Peerage of the United Kingdom), The Earl of Kilmorey, The Earl of Listowel (The Baron Hare in the Peerage of the United Kingdom), The Earl of Norbury and The Earl of Ranfurly (The Baron Ranfurly in the Peerage of the United Kingdom) was created after the Acts of Union 1800. It takes precedence after earlier Earldoms of the United Kingdom.
The Viscount Monck (The Baron Monck in the Peerage of the United Kingdom) and The Viscount Gort was created after the Acts of Union 1800. It takes precedence after earlier Viscountcies of the United Kingdom.
^ Excepting the Archbishops of Canterbury and York who rank higher as the Primate of All England and the Primate of England respectively.
^ The number of bishops entitled to sit in the House of Lords has been fixed at 21 since the 16th century; they were all male until 2015, when women who are bishops began to be introduced to the House of Lords under the terms of the Lords Spiritual (Women) Act 2015.
Justices of the Supreme Court who are not peers have the right to the courtesy title of "Lord" or "Lady" for life by authority of royal warrant issued 10 December 2010.
^ Who are not already ranked higher in precedence as peers or royalty.
^ Privy Counsellors who do not already rank higher are mostly current or former politicians, civil servants, royal household staff, clergy and judiciary.
^ Ranks higher as a Privy Counsellor.
This office was historically held jointly with that of Lord Chief Justice; following their separation, a royal warrant dated 30 September 2005 declared that "the rank and precedence of the President of the Queen's Bench Division shall be so placed as to be in order immediately before the President of the Family Division".
Lords Justices of Appeal are customarily made Privy Counsellors, and thus rank accordingly.
^ Judges of the High Court are customarily made Knights Bachelor or Dames Commander of the Order of the British Empire after having taken office and thus rank accordingly.
Rank and precedence set by royal warrant, dated 21 July 1958.
Baronetcies belong to any of five baronetages, namely the Baronetages of England (1611–1705), Nova Scotia (1625–1706), Ireland (1620–1799), Great Britain (1707–1800) and the United Kingdom (1801–present); this does not affect their precedence in relation to each other.
Legally HRH Princess Louise of Edinburgh according to the 1917 Letters Patent as a male-line grandchild of a monarch, but styled as the duke's daughter per her parents' wishes on their wedding day and the will of the Queen.
Squibb, G.D. (1981). "General Precedence among Men since 1534". Order of Precedence in England and Wales. Oxford, England: Clarendon Press. p. 29.
^ Squibb, G.D. (1981). "The Lord Chamberlain's Order of 1520, as amended in 1595". Order of Precedence in England and Wales. Oxford, England: Clarendon Press. pp. 99–101.