The 66 Seals
Once a very powerful archangel, Lucifer defied God when he was commanded to bow down to humankind. He hated humanity and chose to stand up for the angels. In a further act of defiance against God, Lucifer turned a human into a demon - Lilith, his first.
God imprisoned Lucifer beneath St. Mary's Convent in Illchester, Maryland, behind two-hundred seals, which were designed to keep him there for all of eternity. However, if any 66 of the seals were broken, Lucifer could be freed.
The breaking of the seals began in 1972 when Azazel possessed a priest at the convent, killing eight nuns. This enabled him to speak to Lucifer and discover that Lilith needed to break the seals. Lucifer also told Azazel that he needed to find a very special child...
The First Seal
The first seal was broken unintentionally by Dean Winchester when he finally agreed to torture others during his time in hell. In the words of Alistair:
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. We had to break the first seal before any others, only way to get the dominoes to fall, right? Top of the one at the front of the line. When we win, when we bring on the Apocalypse and burn this earth down, we owe it all to you, Dean Winchester.
He reveals that it was originally supposed to be John Winchester who was the "righteous man", but despite the length of time he spent in Hell, John wouldn't break. Castiel later confirms this to Dean, telling him that he was raised out of Hell because only the righteous man who broke the first seal could stop the rising of Lucifer.
The Other Seals
Lilith breaks a seal with the Rising of the Witnesses. The Witnesses are those people who the hunters failed to save - people who died at the hands of a supernatural being. They rose against their will, leaving them angry and confused, attacking those they believed were responsible for their deaths.They can be identified by a symbol branded on their hands.
The Raising of Samhain was another seal.
By the episode "Criss Angel is a Douchebag", Ruby reveals that 34 of the seals have been broken.
Dean and Sam prevent one seal from being broken by Alistair. The seal requires the death of two reapers on the night of the solstice.
Rufus Turner reports to Bobby that 3 more seals have been broken: ten species extinct in Key West, fishing crew of fifteen goes blind in Alasaka, and a teacher on New York kills 66 students, all in one day.
During the episode "When the Levee Breaks", there are only two or three seals left to break.
The Final Seal
Only Lucifer's First (Lilith) could break the final seal, releasing Lucifer from his imprisonment. Sam takes this to mean that Lilith will be the one to break the seal, and choses to stop her any way he can.
It isn't until she has been destroyed that it is revealed that it is actually the killing of Lilith that is the final seal.
Sam was chosen by Azazel when he was a baby, and had been trained by Ruby in the use of his powers, making him the only one strong enough to destroy Lilith.
As Lilith's blood spills in the convent, a beam of light bursts forward and Lucifer is released...