The apostle Peter wrote in 1 Peter 3:19 that Jesus "preached to the spirits in prison" through the power of God's Spirit and that these spirits had been disobedient. "Spirits" refers to angels. Which angels disobeyed? Biblical history shows that Lucifer initially rebelled against God, at which time he became "Satan" or the opponent of God (Isaiah 14:12-14; Ezekiel 28:12-16). He subsequently drew a third of the angelic creation into mutiny against God (Revelation 12:4).
When these formerly righteous spirits rebelled, they became demons. We learn more about these spirits and their "prison" in 2 Peter 2:4. The word translated "hell" in this verse is from the Greek word tartarus, which doesn't mean "hell" in the way that people today commonly think of it. Rather, it means a place of restraint—that is, a prison. (You can find more about the biblical teachings about hell in our booklet Heaven and Hell: What Does the Bible Really Teach?)
These fallen angels turned from their purpose of serving God and humanity (Hebrews 1:13-14); their rebellion reduced them to hatred and bitterness toward God and His holy purpose for humanity. Their place of restraint is this earth, until God deals with them further in the future.
Putting this information together with 1 Peter 3:20, Jesus apparently confronted these rebellious spirits at the time of Noah's Flood. The Bible doesn't reveal why He did this.
We also publish a booklet that explains the details of Satan's origin, his influence on mankind and his destiny, Is There Really a Devil?