After Lucifer was banished from Heaven for defying God, he twisted a human soul into the first demon. After this, God sent Michael to imprison Lucifer in the cage which was locked was locked with mystical seals.
In 1972, Azazel possessed a priest at St. Mary's Convent, and killed eight nuns in the chapel. This enabled him to speak to the imprisoned Lucifer. Lucifer tells Azazel that Lilith is needed to break the 66 Seals that hold him captive in the Cage and that he needs to find a very special child.
In 2008, after Dean's return from Hell, Castiel reveals that Lilith is trying to break the seals that lock the Cage in order to free Lucifer. Dean later learns that the first seal was broken when he was in Hell, and broke under torture and began torturing souls himself. Sam continues clandestine missions with Ruby, developing his powers even though this involves drinking demon blood, believing that killing Lilith will stop the Cage being opened.
As Sam and Dean attempt to find a way to stop Lucifer and the impending Apocalypse, Gabriel tells them that the Four Horsemen of the Apocalypse all own rings that together can reopen a portal to the Cage anywhere.
After collecting all the rings, Sam comes up with a plan in which he will allow Lucifer to possess him, and then force him into the Cage. The initial attempt fails, but when Lucifer confronts Michael at Stull Cemetery, Sam activates the rings and as the Cage opens, he manages to gain enough control to force himself (and Lucifer) into the Cage. Michael (in possession of Adam's form) tries to stop him but is himself captured.
Raphael tried to reopen the Cage to release Lucifer and Michael, but was ultimately unsuccessful.
Sam is subsequently rescued from the Cage by Castiel, but his soul remains trapped in the Cage being tortured by Lucifer and Michael. Death agrees to retrieve Sam's soul, and returns it to his body, setting up a temporary "wall" in Sam's mind to prevent the knowledge of the horrors that happened in the Cage from destroying him.
Following the release of The Darkness, cries of anguish are heard coming from the Cage, and the demons speculate that Michael or Lucifer are trying to warn them about it. Sam also starts having flashbacks or visions of his torment in the Cage.
Each of the Four Horsemen of the Apocalypse own individual rings that together form a key-like device that can reopen a portal to the Cage.
Where is The Cage?
The exact location of the Cage is quite vague. It seems to be of the same realm of Hell, though obviously separate from the part of Hell where demons are produced, as it took great effort for even Azazel to establish communication with Lucifer. H
Dean is able to open the Cage via the Horseman's rings in a deserted building and Sam uses them to open the Cage in Stull Cemetery. The fact that it can be entered from multiple locations suggests an existence in a different dimensional plane.
Sera Gamble described the Cage as being "at the bottom of the lowest depths of the ninth circle of the worst bit of Hell." Source.
Dean: Why break the seal anyway?
Castiel: You think of the seals as locks on a door.Castiel: Lucifer walks free.
Dean: Okay, last one opens, and?
Castiel explains to Dean that if Lucifer ascends to from his Cage, Hell and chaos will follow his presence on Earth. He later elaborates by saying that all of creation will literally experience Hell if Lucifer roams Earth.
And it is written that the first seal shall be broken when a righteous man sheds blood in Hell. As he breaks, so shall it break.
And it is written that the first demon shall be the last seal.
Ruby helps Sam find a demon who can reveal Lilith's location. In preparation for confronting Lilith, Ruby encourages Sam to drink the demon's blood (killing the woman it is possessing in the process). At St. Mary's Convent, Sam uses his powers to kill Lilith, only to have Ruby reveal that Lilith is actually the final Seal holding the Cage secure. Lilith’s blood forms a spiral circle in the middle of the chapel at St. Mary's Convent and the gates of Lucifer’s prison open and Lucifer is released into the world.
Following Sam Winchester's actions of killing Lilith the first demon, a direct portal to Lucifer's Cage opens, which releases Lucifer where he ascends from its bowels, soon arriving on Earth. While Lucifer rises from the Cage, his mere essence launches a bright white column of light from the shaft of the Cage.
Without me, you got zero shot at killing Lucifer. Sorry. But... you can trap him. The cage you sprung Lucifer from, it's still down there, and maybe, just maybe, you can shove his ass back in. Not that it'll be easy. You got to get the cage open, trick my bro back into it, and oh yeah, avoid Michael and the God Squad. But hey - details, right? And here's the big secret, Lucifer himself doesn't even know. But the key to the cage, it's out there. Actually it's keys, plural, four keys. Well, four rings from the Horsemen. You get 'em all, you got the cage.
Sam and Dean try to kill Lucifer with the Colt but fail, and are desperate for a solution. In a hidden message recorded on a Casa Erotica DVD, Gabriel reveals posthumously how Sam and Dean can trap Lucifer back in his cage. The keys to the cage are the rings worn by the Four Horsemen of the Apocalypse.
Sam comes up with a plan - he could consent to Lucifer's possession, and with much determination he could resist Satan’s for a brief moment; which would give him time to jump into Lucifer's cage with Lucifer inside of him. Bobby and Dean are both against the idea.
Sam and Dean get the final two rings after Castiel cuts off Pestilence's finger using Ruby's knife and Death gives his ring to Dean in exchange for his promise to do whatever it took to free him from Lucifer's control, ensuring that Sam would jump into the cage as soon as he consented to possession by Lucifer. Death also instructs Dean on how the rings work to open the cage, although the explanation is not shown in this episode. Dean is later shown working with all four rings on a table. They join together to form a triangular shape with War's ring in the center and the other three rings surrounding it. When Bobby asks him about Death teaching him how the rings work, Dean responds "Yeah, it's nuts."
Bvtmon Tabges Babalon.
Dean finally agrees to support Sam's plan though he has deep misgivings "Your hell is gonna make my tour look like Graceland."
Sam primes himself by drinking demon blood and then they confront Lucifer. Lucifer knows of their plan, but Sam says "yes" anyway. As Lucifer takes him over, Dean uses the ring and an incantation to open the "door" to the cage. However Lucifer is in control, and he easily closes it.
Later, in Stull Cemetery, Lucifer faces Michael who appears using Adam as a vessel. Lucifer tries to dissuade Michael from the fight, blaming their conflict on God, and suggesting they walk away. Michael counters that he must carry out God's orders, and that it's his destiny to kill Lucifer, who is evil. Just then Dean arrives in the Impala, Def Leppard's "Rock of Ages" blaring.
Dean tries to talk to Sam, inside Lucifer, but Michael tells him it's not his fight anymore. Castiel arrives and throws a Molotov cocktail made with holy oil at Michael, causing him to vanish temporarily. Lucifer turns and disintegrates Castiel, and then as Bobby shoots him, he snaps his neck.
Lucifer starts to beat Dean, taunting him, saying he will kill him slowly and make Sam feel it. Dean doesn't resist, just telling Sam he won't leave him. As he goes to land another blow, he glances at the Impala, and suddenly all Sam's memories of life with Dean rush at him, allowing Sam to take control over Lucifer. He tosses the Horsemen's rings to the ground, recites the incantation to open the Cage. He and Dean look at each other one last time, but as Sam goes to throw himself in, Michael reappears. Michael tries to stop him, but Sam drags him into the chasm too, and it shuts.
I don't want to talk about it. I get to breathe fresh air, have a beer, hunt with my family, see you again. So why exactly would I want to think about Hell?
Sam reveals that he escaped the Cage soon after tumbling into it. He remembers his time there, but when Dean asks, he doesn't want to talk about it. Dean speculates that God may have brought him back.
Dean tells Bobby that Sam has been different ever since he was released from the Cage. He speculates that Sam may still be a Vessel for Lucifer but Castiel denies this, and says that if Lucifer was on Earth, he would've felt his presence.
The Leprechaun is able to make deals with humans so that they may fulfill their wishes. He also seems to be very powerful, employing what he calls "real magic." He claims to be able to lift Sam's soul from Lucifer's Cage, and scoffs when Sam mentions that not even angels could accomplish that saying that fairies "Got a way of gettin' in back doors".
Castiel tells Dean that Sam's soul, having been tortured by Lucifer for over a year, may be irrevocably damaged. Crowley also confirms this.
Dean has himself purposefully 'killed' under medical supervision, so he can plead with Death to rescue Sam and Adam from the Cage. Death agrees to rescue only one of them - and Dean chooses Sam. Death makes a wager with Dean, that if he will wear Death's ring for one day, and perform his duties, then Death will rescue Sam's soul. he tells Dean that he will be able to contain the part of Sam that will be damaged from his time trapped with Michael and Lucifer behind a 'wall' in Sam's mind, although he can't guarantee how long this will maintain. Although Dean fails to wear the ring for a day, Death agrees to retrieve Sam's soul, which he returns to Sam.Sam starts remembering a portion of events that happened when he lacked a soul. After Sam and Dean resolve the murders, Sam falls onto the floor, shaking uncontrollably, where he recalls some of the torture he endured in Hell by Lucifer, where he is seen covered in flames.
After Dean, Sam and Bobby learn from Eleanor Visyak that Castiel has enough information to crack a door inside Purgatory wide open, Castiel appears, asks them to leave, but when Dean refuses, he touches Sam's forehead, cracking the wall that Death planted there in the process.
Immediately after the incident, Sam lies unconscious on a bed in Bobby's Panic Room. Although unbeknownst to him at the time, as he thinks it is all real, Sam is actually going through mental experiences, where he first fights a soulless version of himself, he kills it and absorbs its memories, a while later, he confronts a version of himself that recalls all of what happened to him the cage, and, he kills it and takes in its memories, as he gets flooded with those experiences. By doing this, he is able to wake up.
Once he wakes up he goes to assist Dean and Bobby, and on the way, he has mental visions of Hell, but somehow manages to overcome them.
After the Darkness was released, an animalistic scream was said to have been heard originating from the Cage. As was reported to Crowley, at least half of Hell shows concern that either Michael or Lucifer were trying to warn everyone of the coming Darkness.
Sam has a vision of when he was tortured in the Cage, with hooks in his flesh being pulled apart by chains.
Sam has a vision or flashback of Lucifer's Cage.