Barbarossa was born Khidr (Hızır Reis) on the Turkish controlled Greek Island of Lesbos. He was the son of a Turkish potter and a Greek Christian mother. He inherited the name Barbarossa or Red Beard from his older brother Aruj who successfully transported many Moorish Muslims from Spain to Africa. They named him Baba Aruj (father Aruj) but the Italians heard Barbarossa, which means Red Beard and he so happened to have Red Hair. The name stuck with Aruj and then was passed to Khidr who also had red hair.
Barbarossa has many names and titles and different spellings due to English translations of the Turkish Arabic. The brothers started out as Pirates along the coast raiding Christian Villages. In 1516, Khidr and his older brother Aruj invaded Algiers to kick the Spaniards out. They were invited to come help by local Amir, Salim al-Tumi but after defeating Spain they assassinated the Amir and Aruj became the ruler of Algiers. His position was not secure so he joined with the Ottoman Empire under the rule of Suleiman the Magnificent and became the Bey of Algiers. A Bey is a Tributary ruler, General or Governor. When Aruj was killed Khidr took his place as Bey of Algiers.
Khidir Barbarossa made the Ottoman Navy a very powerful force in the Mediterranean. They raided and took Christians as slaves. In 1538 Pope Paul III organized a "Holy League" made up of the Papal States, Spain, the Knights of Malta, and the Republics of Genoa and Venice. Barbarossa beat them with a smaller Naval fleet and Suleiman the Magnificent gave him the titles or "Grand Admiral" of the Ottoman Navy, and or "Governor of governors" of Ottoman North Africa.
The Mediterranean Ocean was ruled by the Ottoman Empire for 30 years. Barbarossa was asked to be the head of the fleet by the Holy Roman Emperor Charles V, which he turned down. He even helped France defeat the Spanish and keep them out of France in what the Christians called the “Unholy Alliance”. Barbarossa retired in 1564 and wrote a 5-volume memoir before he died the next year.