It becomes clear, once we fit this together with II Peter 2:4; Jude 1:6; Revelation 12:3-4,9; and Ezekiel 28:12-14, that God assigned the angels to the earth under their commander, Lucifer (Helel in Hebrew), who was the sum total of all that God could create by fiat in a created being, perfect in his ways until iniquity was found in him. We see a picture of a being of awesome beauty and power, of tremendous intelligence, and like us, a creature of free moral agency.
Something happened to that great being, and he began a campaign of deceit. He began to separate from God a number of the angels, undoubtedly using the reasoning that they should have more, that God should treat them better, that God was being unfair, that they did not have the liberty or the power that was due them. At some point he began to express, "I will be like the Most High."
Some commentators say that the Hebrew says in reality, "I will be God," not just like God. We can see what he wanted: complete power, authority, and control. He did not want to be under another; he did not want to be submissive. He did not want another being pulling his strings or controlling him.
He wanted to sit, as it says, on the mount of the congregation. So he decided, "I will make war. I will ascend into heaven." So the demons left their first estate, the realm of their authority, and they mounted up in war and attacked God. They were soundly defeated and cast down. Their first domain became a place of restraint, literally "a silo," a pit, where they were chained. This suggests that, as a result of their rebellion, they no longer have the liberty that they once had, but are now held in restraint. A great deal of their free moral agency was taken from them.