What does Peter mean when he talks about Christ preaching to the spirits in prison (1 Pet. 3:19)?

To understand this text it is necessary to read the entire passage (1 Pet. 3:18-22). Verse 18 reveals that Jesus the divine Son of God who was put to death for our sins was "made alive" through the power of the Holy Spirit. Verse 19 makes a transition and declares that it was by this same Holy Spirit that Christ spoke to the spirits in prison. When did he preach to these spirits in prison?

Who are the spirits in prison? Verse 20 tells us! In the days of Noah, the hearts of men and women were only evil continually. They were in bondage to evil spirits. The same Holy Spirit which raised Jesus from literal death appealed to men and women possessed by evil spirits who were spiritually dead in the days of Noah to bring them to spiritual life. The Spirit of Christ spoke through the prophet preaching the gospel to men and women trapped in spiritual prisons (1 Pet. 1:10-12).

The mighty power of the Spirit opens the prison of sin so the captives go free (Isa. 61:1). 1 Pet. 3:21 makes the illustration even clearer. The experience of the flood is likened to baptism. Just as the Holy Spirit raised Jesus from death to life, just as the Holy Spirit led Noah's family into the ark, preserving them from death and leading them to life, so the Holy Spirit works awakening spiritual life, convicting men and women of sin, providing power for a changed life and leading them through the waters of baptism.

In Noah's day, the Spirit led men and women from death to life.Today the Spirit delivers men and women from Spiritual prisons leading them from death to life all because of the mighty power of the resurrected Christ.