Many angels laid siege to Hell to rescue Dean, but it was Castiel who ultimately pulled Dean out. According to Castiel, he did so "Because God commanded it." His hand print was burned into Dean's left shoulder.
Castiel is amongst a group of angels who manifest on Earth to stop the breaking of the the 66 Seals which will release Lucifer and start the Apocalypse. Over time he develops an empathy for the Winchesters, in particular Dean. When he learns that Michael actually intends for Lucifer to be released so he can kill him, Castiel tries to warn Dean, but is punished. Ultimately he breaks allegiance with Heaven to side with humanity.