God created a large number of beings without physical substance, called spirits. God also created evil, and allowed it to appear in Lucifer, the Head Archangel, to prove that ultimately good would prevail over evil.
Lucifer sought to gain the allegiance of the created beings, which should have been directed to God. As a result, there was a "rebellion" in this "heavenly state" and the created beings(spirits) were divided into three basic groups - those who fell willingly, those who were persuaded to fall, and those who remained faithful to God.
In the Heavenly State, when all the spirits were created, they were commanded to be obedient to God, their Creator. Lucifer, one of the head Arch-Angels whom God had placed over some of His works, endeavoured to get all spirits to give allegiance to him and not to God. Some went fully with him, others endeavoured to resist him and only gave him partial allegiance, while the third group stood loyal to God and gave no allegiance to Lucifer at all.
Another archangel, Michael by name, is mentioned in the Scriptures. Michael, we believe, was the Head Archangel, who stood for God and good, and who with the faithful spirits cast Lucifer and the fallen spirits out from the presence of God (The Heavenly State - Revelation 12:7,8; Daniel 12:1).
God is now giving those of the second group an opportunity to prove their loyalty and obedience to Him through the means of a body and soul.
Further reading on this topic: