Basically what determined what your title was was blood or who you married. Blood more so for the men and you you married for the women. Women could marry up into a higher rank but men had to either inherit the title or be granted it by the King. Sir isn't really a title but what you might use to address someone such as a baronet, which is a title below baron. Lord and Lady is what you might use to address someone from the rank of baron all the way up to a Marquis. A Duke is the highest title you can have with out being a king or prince. They were sometimes the younger siblings of the king and the king and prince could carry an additional title of duke. From the list you have the titles go in order of rank: King, Duke, Marquis, Earl, Viscount, Baron, and then Baronet. It looks like you already know that an Earl and a Count are equivalent to each other. There are other titles depending on which country you're referring too but I went off of what I know about the English nobility. Hope that helps!
Lord is a prince. Lady is a person of high status or class, so kind of like a rich person (who obviously would have royal status). Baron is a title of nobility in general. Baroness is a woman of nobility. Earl is means chieftain, or someone who is in charge, who rules the King's territory. Countess is the Count's wife, who is a nobleman in a European country. Viscount is a member of European nobility who is above a baron but below an earl or a count. Viscountess is his wife. Marquis is a nobleman in Europe, Duke and Duchess are the highest rank below the Monarch. Sir is like a knight. These are the ranks of the royals in order, from highest to lowest: Emperor, King, Grand Duke, Grand Prince, Duke, Prince, Marquis, Count, Earl, Viscount, Baron, then finally a Knight.