"Lord" is a courtesy designation used by some male members of the British peerage and their sons, while "sir" is a title given to baronets and knights. According to The Age of Exuberance by Donald Green, "lord" has also been used by Scottish judges, who combined the designation with the name of their estate.
For marquesses, earls and viscounts, "lord" is used as an informal address. The Earl of Devon, for example, could be addressed informally as Lord Devon. "Lord" is never used to refer to dukes. When addressing barons, "lord" is almost always used in both formal and informal settings.
The eldest son of a duke, marquess or earl would be given a courtesy title that is one rank below his father's title. For example, the eldest son of the Marquess of Blackwood would be called the Earl of Blackwood. Younger sons of a duke or marquess would be addressed with "lord" preceding their given names.
Although a baronet is considered a commoner, a baronet's title is hereditary and can be passed to the baronet's eldest son or male descendant. The eldest son of a baronet would receive a knighthood at the age of 21. A knight's title is not hereditary. All baronets and knights would be addressed with "sir" preceding their family name.