Sir is a formal honorific address in English for men, derived from Sire in the High Middle Ages. Both are derived from the old French "Sieur" (Lord), brought to England by the French-speaking Normans, and which now exist in French only as part of "Monsieur", with the equivalent "My Lord" in English.
Traditionally, as governed by law and custom, Sir is used for men who are knights and belong to certain orders of chivalry, as well as later applied to baronets and other offices.
As the female equivalent for knighthood is damehood, the suo jure female equivalent term is typically Dame. The wife of a knight or baronet tends to be addressed as Lady, although a few exceptions and interchanges of these uses exist.
Additionally, since the late modern period, Sir has been used as a respectful way to address a man of superior social status or military rank. Equivalent terms of address for women are Madam (shortened to Ma'am), in addition to social honorifics such as Mrs, Ms, or Miss.