In this chapter we see the persecution continue. James the brother of John, one of the original disciples is killed by Herod, the king in Jerusalem. This goes down well with the Jews at the time and so he decided to get Peter, probably with him being the main leader. He locks him in prison so that he can do the trial after the Passover. However it doesn't follow Herod's plan because God has a different one.
Let's look at the situation Peter was in. He is bound by two chains; these would not be like the flimsy steel handcuffs we have these days but rather two huge heavy cast iron chains with big shackles, with pins and locks to hold them together. They would have been attached to the floor or wall via cast iron hoops drove deep into solid stone. He had a guard either side, who would have been heavily armed. There were also guards at the door of his cell then another set of guards further down the corridor. Finally there was a large heavy cast iron gate leading out to the city. Herod had made sure that no one was going to get Peter out, or so he thought. But God intervened! He sent an angel who struck Peter on the side and so the heavy chains silently fell away. The angel then tells Peter to get his cloak and follow him. They walk past all the guards and out through the open gate. No one notices and Peter thinks it's just a vision like the sheet in chapter 10. But it's not, it's actually happening. Peter walks down a street away from the prison and then finds himself alone and free.
Peter goes to where the disciples are praying for his safety, possibly in tears and with all their strength, and knocks on the door. The girl that goes to check the door is so excited that it's Peter that she forgets to let him in and leaves him knocking.
It's amazing how nothing is beyond God's power. Herod had done all he could to make sure that Peter was going nowhere unless he was led there by a guard, yet God made the chains melt away like butter.