How it was that Heaven came into being is the subject of many legends, and of much speculation and debate. While the stories vary, central to each of them is the figure of Castiel, the Almighty Father of Clan Heaven. Some of the more popular tales are below.
Castiel is the center of creation in the universe. He was the very first deity to come into creation, and also created everything that we see in our universe. He was slightly lonely, and so after creating Earth, decided to create his very own realm above it, not visible to anything below it unless it was a creation of Heaven. Heaven was the name that he decided on for his realm. He created the Archangels first, making them the most powerful of all of the angels. The Seraphim came next, being slightly less powerful, but still far more powerful than any other angel that would come after it. He continued creating more and more ranks of angels, and more and more angels to go into those ranks, the lowest rank was just known as Angels, which housed some of the weakest Heavenly beings, such as: messenger angels, guardian angels, reaping angels, etc.
Castiel was one of two creations, the other being Death. With the help of his counterpart, Castiel created the universe and his realm, but Death was in complete control of the reaping angels and the fate of any lifeform with a limited lifespan. To this day, those two powerful beings keep in touch and are still quite fond of one another, practically being siblings. Since Castiel is viewed as "God" in all of these lores, he obviously now has multiple aliases that many different beings call him.
Castiel was created from the first God, and was only an angel for the longest time. But suddenly, God disappeared from Heaven, never to be seen again. Heaven was in complete shambles and had no clue who was to rule and why. Seeing as Castiel was the most powerful Archangel, and also the first ever created Archangel, decided to take the throne, only temporarily at first, just to keep Heaven running until God came back. But when Castiel began gaining power from the throne of God, he still decided that if God did come back, he would give the throne back to him, if not, he would continue to gain more and more power to keep his rule over Heaven. He ruled Heaven for millennia with no problems, no big problems anyway. He ran it very similar to how God ran it, but obviously wasn't as powerful, and didn't have everyone's support and trust at first. However, after running it for so long without much issue, all of the angels are glad to continue as they did, with him as their leader. To this day, God still hasn't returned, and it has been at least 5 millennia since he left.