The idea goes like this as unpacked by various church fathers. From the beginning of Jesus’s ministry Satan tries to thwart Jesus. But failing to get Jesus to fall into sin Satan ultimately decides to kill Jesus, to just get rid of the guy. (Recall that Satan enters Judas’s heart suggesting that the death of Jesus is Satan’s idea and plan.) Satan, we know, eventually succeeds and Jesus is killed. Thus, Satan, who possesses the keys to Death and Hades, now “owns” Jesus and has him locked up in Hades.
Satan has taken the cheese.
However, what Satan doesn’t know is that Jesus isn’t just another human being. Jesus is God Incarnate. In this Jesus is sort of like a Trojan Horse. So when Satan takes Jesus to Hades–Surprise!–he finds that the enemy has entered the gates. There in hell Jesus takes the keys of Death and Hades from Satan, binds him, and then releases the captives. In Christian theology this is called the Harrowing of Hell.
The mousetrap snaps.