But the Peerage system is not the same as the Order of Precedence and except the Sovereign herself, being a British royal has nothing to do with having automatically a rank among the British nobility. Princes and Princesses of the United Kingdom are such persons by birth or by creation (Prince Philip) but these are not
stricte titles of nobility.
And being a royal prince and princess place a person at the top of the social class system, so the full Royal Family members rank above other persons in the order of precedence in the UK. They outrank all peers of the realm and if they are peers themselves, it does not implicate their precedence among the other royals. It is the degree of their kinship to the Sovereign which governs the order of precedence among the RF members. For example, The Prince Edward, who is also an Earl, outranks the Dukes of Gloucester and Kent, who are both Princes of the UK, just like Edward is, but also Dukes. It is because he is a son of the Sovereign and they are the Queen's paternal first cousins. And Prince Michael of Kent comes after Prince Edward, the Duke of Kent not because Edward is a duke and he is not, but because the Duke is older than him. The same rules of the order of birth place the Duke of Gloucester, born 1944, above the Duke of Kent, born 1935. The minor one is 9 years older than the senior one. This is because the Duke of Gloucester's father, Prince Henry, was older than the Prince Geoge, Duke of Kent's father.
So it's important to notice that
formally and historically it's not that simple but in practice, generally, it is quite just like Artemisia pointed it out.
And to the non-UK rank of titles, it's even more complicted. In many countries, such as the Holy Roman Empire, Prussia, France and until today in Belgium, there were/are Princes of the Royal House and other princes. In France there were also the so-called Foreign Princes, who were descended from non-solely French houses with at least some degree of sovereignty, adopted into the French society in a privilleged position to the Peers of France. Besides foreign princes, there were princes who were nobles of the realm. There were also dukes with no sovereignty, considered members of the nobility. And they were higher in rank than the Princes. The British case of Royal dukes outranking non-Royal dukes is a very different question and is about the royal dukes's status as royals.
I hope my reply is understandable and I did not lose myself in presentation of my arguments.
Pardon for my poor English.