Heaven, and its angels, is within a mysterious sphere called Eternity. To say that this reality existed “before” the material world (or will, after it) does not have a logic that we can casually use to comprehend what these ideas might mean, we living in within time. Eternity one can equate to the spirit world, the unseen world. We understand this because the apostle Paul tells us that the visible world is only temporary, while the unseen world is eternal. One might think this curious since we think of the spirit world existing in ghostlike terms. But it is not impossible for that world to have solidity to it, too, even more than the hardest thing in the realms material. It is just not how it is usually described, when the few who have, came in contact with it.
One might consider that the angels were created “before” the world was, since they were created in the context of Eternity. They are spiritual entities, though throughout the Bible they assumed material form; however, we do not hear of any human being actually physically touch an angel, which may make us conjecture that while they may have had visible form, they may not have been corporeal. We do not know. As for how the story goes, the angels who existed in Heaven were ordered from greatest to least, and at “first”, there was harmony among all the heavenly host.
Then, the greatest angel, called Lucifer (“light bringer”), began to swell up with pride because of his greatness, and in so doing became blind to wisdom. Instead of following the way of love, the way of the most high, he sought his own way: and what was outside that way was to say no to the Spirit, for this is the blasphemy that you are not forgiven for. To say no to love kills within you that part which so denied it. And even that kind of act was originally from the Devil, for in causing Sin to be was the consequence, an entity which formed when he moved to blaspheme. This idea is an expansion of what Milton wrote in Paradise Lost. Milton also wrote that Satan then copulated with his daughter Sin, and so gave rise to the coming of Death. This would be the Devil’s primordial son, the spirit of the Antichrist.