Spike does "die" at the end of Buffy season 7 but is resurrected for Angel season 5. At the end of Angel season 5 when they are all stuck in the alley, it's not shown if they live or die DURING THE SHOW. The story is continued by Joss Whedon in comic book format and Wolfram & Hart did a really crazy thing and ended up making LA a living hell. Angel and Spike are alive.
Ok, in the end of Angel we only see the finally fight between, Angel, Spike, Illyria, & Gunn against The Black Thorn. But in Buffy the Vampire Slayer season 7 Spike does die in the end of series to save the world. It will make a lot of sense if you got Season 5 of Angel. Be ready for the competion between Angel vs Spike fighting over Buffy, so funny LOL.
"My opinion if got all Seven Seasons of Buffy & Five Seasons of Angel it would give a better explaination of your question"
If you are referring to the end of Season 5, neither Angel nor Spike die. If you are however, referring to the canonical continuation of the series, Angel: After The Fall (or Season 6), it has yet to finish. But if you are willing to go all out, throughout the Buffyverse Canon, Spike dies three times, whereas Angel dies a total of four. Firstly, they both technically become the living dead when being sired by their Vampire Lovers, Darla and Drusilla. At the climax of Buffy: Season Two (Becoming, Part Two), the evil Angelus is returned to Angel, but is then stabbed by Buffy and thrust into Hell. During the Angel: Season Five episode, "Time Bomb", Illyria's overwhelming power envelops her as her timeline is torn apart and stitched back together out of sequence. The frustration and paranoia she experiences due to this leads her to the conclusion that Angel and his crew are planning to kill her. She, however, gets to them first and kills four members of Angel's group, including Spike and himself; Spike by stake, Angel by decapitation with an axe. After another time skip, she accidentally brings an earlier version of Angel with her. After discovering the fates of himself and his fallen comraddes, Illyria time skips again to the moment before their untimely deaths. Angel insists he never wanted to kill her (even though he did) and ultimately gains her trust in order for her to spare him and his friends. Wesley then extracts her overloading power, thus ending Illyria's time skips (for the moment anyway). In Angel: After The Fall (Issue #13), Spike is killed by a troupe of Slayers he tried to save, who were captured in an effort to train a group of Vampires against them. But due to a 5-minute time reset put in place to prevent the Vampires from being killed inevitably, Spike is revived. The Senior Partners of Wolfram & Hart also send L.A. into Hell as punishment for Angel's retalliation against them. Knowing full well that the Senior Partners of Wolfram & Hart need Angel alive as he plays a major part in the Apocalypse. Angel tricks Gunn into killing him (Aftermath Issue #16), so they have no choice but to reverse time to the point before L.A. is sent to Hell, thus reviving Angel and anyone else who had died during "the fall". So there they are; Angel and Spike die several times but manage to come back fighting. And just to make it clear, Spike doesn't truly die at the end of Buffy: Season 7. His body is burnt to a crisp, though his essence, and more importantly his soul, becomes trapped inside the necklace Angel gave Buffy, thus when he is brought back at the start of Angel: Season 5, he has an uncorporeal form, yet retains his personality and also radiates heat, something which ghosts do not do