A peer is a member of the nobility. It is sometimes used instead of 'Lord'. In formal or old British documents, the House of Lords is called the House of Peers.
In the United Kingdom there are five ranks of the peerage:
Informally Barons, Viscounts, Earls and Marquesses are called lords, and instead of their name when speaking to them, the term 'my lord' is used. A Duke is never called a lord. 'Your grace' is used for a Duke.
Since 2004 a list of peers has been kept by the Lord Chancellor and Secretary of State for Justice. This list, called the Roll of Peerage Archived 2013-03-18 at the Wayback Machine had to be kept to prove who was a peer. The list of members of the House of Lords used to be the same until the hereditary peers were excluded. Official documents can only call someone a peer if their name is on the Peerage Roll.
Sorting out which peer should precede (come in front of) in a procession or other event depends on three different things:
The only exceptions are the royal dukes, and the Duke of Abercorn.
The QUEEN has been graciously pleased by Warrant bearing date the 18th instant to declare and ordain that His Royal Highness Philip, Duke of Edinburgh, Knight of the Most Noble Order of the Garter, Knight of the Most Ancient and Most Noble Order of the Thistle, Commander in the Royal Navy, shall henceforth upon all occasions and in all Meetings except where otherwise provided by Act of Parliament have, hold and enjoy Place, Pre-eminence and Precedence next to Her Majesty.[permanent dead link]