The spirits in prison
"For Christ also hath once suffered for sins, the just for the unjust, that he might bring us to God, being put to death in the flesh, but quickened by the Spirit: By which also he went and preached unto the spirits in prison; Which sometime were disobedient, when once the longsuffering of God waited in the days of Noah, while the ark was a preparing, wherein few, that is, eight souls were saved by water." (1 Peter 3:18-20)
Who are the spirits?
Hebrews 1:7 "And of the angels he saith, Who maketh his angels spirits, and his ministers a flame of fire."
Hebrews 1:13-14 "But to which of the angels said he at any time, Sit on my right hand, until I make thine enemies thy footstool? Are they not all ministering spirits, sent forth to minister for them who shall be heirs of salvation?"
Genesis 6:1-9 "And it came to pass, when men began to multiply on the face of the earth, and daughters were born unto them, That the sons of God saw the daughters of men that they were fair; and they took them wives of all which they chose. And the LORD said, My spirit shall not always strive with man, for that he also is flesh: yet his days shall be an hundred and twenty years. There were giants in the earth in those days; and also after that, when the sons of God came in unto the daughters of men, and they bare children to them, the same became mighty men which were of old, men of renown. And GOD saw that the wickedness of man was great in the earth, and that every imagination of the thoughts of his heart was only evil continually. And it repented the LORD that he had made man on the earth, and it grieved him at his heart. And the LORD said, I will destroy man whom I have created from the face of the earth; both man, and beast, and the creeping thing, and the fowls of the air; for it repenteth me that I have made them. But Noah found grace in the eyes of the LORD. These are the generations of Noah: Noah was a just man and perfect in his generations, and Noah walked with God."
So who were these sons of God?
Job 1:6 "Now there was a day when the sons of God came to present themselves before the Lord, and Satan came also among them."Job 2:1 “Again there was a day when the sons of God came to present themselves before the LORD, and Satan came also among them to present himself before the LORD.”
Job 38:7 “To what were its foundations fastened? Or who laid its cornerstone, When the morning stars sang together, and all the sons of God shouted for joy?”
Luke 3:38 "Which was the son of Enos, which was the son of Seth, which was the son of Adam, which was the son of God."
Angels having been created by God are called the sons of God as was Adam, the first man having been created by God, the daughters of men on the other hand where created through human effort.
What was there Sin?
Job 4:18 "Behold, he put no trust in his servants; and his angels he charged with folly"
Jude 1:6-8 "And the angels which kept not their first estate, but left their own habitation, he hath reserved in everlasting chains under darkness unto the judgment of the great day. Even as Sodom and Gomorrha, and the cities about them in like manner, giving themselves over to fornication, and going after strange flesh, are set forth for an example, suffering the vengeance of eternal fire. Likewise also these filthy dreamers defile the flesh, despise dominion, and speak evil of dignities."
So angelic beings, sons of God and not sons of men, saw the daughters of men and desired them and then had children with them! The result of this union were the giants, a race of beings that God had not intended to be created, but were instead a product of an ungodly union between angels and men.
The Angels that sinned have been reserved in judgment, cast into a prison of sorts awaiting judgment. To these spirits in prison, Jesus went and preached to them, scripture does not say what he preached.
For more on this subject see our article "The Nephilim, Giants on the Earth"