In the real world, death is the end, but for the heroes of DC, permanent death is more of a theoretical concept. It makes sense when you think about it; characters who have been around for decades can't disappear for good or publishers would have a serious deficit where superheroes are concerned. For DC, that means you can bump off Batman or Superman, but they're going to have to come back sooner or later or risk a full-on fan uprising.
And that's pretty much how things go in the DC Universe. A character everyone loves sacrifices themselves for the greater good, their friends and readers get emotional, and life goes on. After a little while, they come back - maybe a little stronger, sometimes a little wiser, but they almost always come back.
Almost all of DC's biggest heroes have met their maker at some point, but those ends weren't exactly permanent. In a lot of cases, fans focused more on counting the days until they came back than mourning the losses.
How'd He Go?: Martian Manhunter went toe-to-toe with a ton of powerful enemies over the years, but his end didn't reflect that. In the opening of Final Crisis, the Apokoliptan operative Libra opted to prove his villainous chops to the Secret Society high council by ruthlessly taking out the Martian superhero. He showed no mercy with the Manhunter, setting him on fire in front of the Secret Society so they could watch him succumb to his greatest fear.
How Long Was He Gone?: Martian Manhunter spent a little under a year being truly dead before a brief reanimation in Blackest Night. By the time he was finally brought back to life in a more permanent way, he had spent about 13 months out of commission.
How'd He Come Back?: J'onn remained dead for a while and returned during Blackest Night as a zombified member of Black Lantern Corps. He fought as part of Nekron's forces trying to finish off his former allies on Earth. When Blackest Night led to Brightest Day, J'onn J'onzz was resurrected by the Entity, along with several other long-passed heroes and villains.157An obviously temporary end?
How'd He Go?: After Dick Grayson left the identity of Robin behind, he became Nightwing, and over the long course of his crimefighting career, he's died a couple of times in the main universe as well as notable Elseworlds. He died and came back as Deadman in the Injustice universe, but his big end came in the Forever Evil event when he was captured by the evil alternate universe heroes of Earth 3 and had his secret identity revealed. They then trapped him in a device that was set to explode as long as his heart kept beating. Lex Luthor stopped his heart to save the day, enraging Batman in the process.
How Long Was He Gone?: He was revived by the end of Forever Evil series, but he wasn't back on the streets as Nightwing for two years.
How'd He Come Back?: Lex Luthor stopped Nightwing's heart with adrenaline, so while Grayson technically died, Luthor was able to revive him soon after. Grayson took the opportunity to stay out of the spotlight with his secret identity revealed, so he let the world think he was still a goner while he infiltrated the evil organization Spyral.1811An obviously temporary end?
How'd He Go?: Before the Crisis on Infinite Earths crossover event, Barry Allen had retired from being the Flash, but he came back for the fight against the Anti-Monitor. During the battle, the Anti-Monitor's anti-matter cannon was primed to destroy the universe, so Barry ran around it incredibly fast. He ran so fast, he broke the limits of how fast a Flash could possibly run, and it came at a price. Running around the cannon so quickly brought down its outer casing, which made it possible to destroy the device, but doing so caused him to age into oblivion. He literally aged as he ran, and ultimately faded into the Speed Force.
How Long Was He Gone?: Barry Allen is one of the DC Universe's most significant ends. His end seemed permanent for a long time, and it had an impact on his friends and allies. He didn't return to the DC Universe for 23 years, which is an insanely long time to keep a beloved character out of print. Granted, there were some appearances in Elseworlds/alternate reality stories, but canonically, the Flash was gone.
How'd He Come Back?: Flash's return to the mortal world defies an easy explanation. Grant Morrison brought him back in DC Universe #0, which is narrated by someone who associates himself with "everything" as he recounts his past. He discussed the Justice League, with a focus on both Hal Jordan and Superman. As he tells the story, his text boxes begin to evolve from yellow on black backgrounds into one that features a lightning bolt. As his story continues, he begins to remember who he is, and as it comes to a close, a yellow lightning bolt strikes in front of the moon with the words, "and now I remember." It turned out that Allen had been consumed by the Speed Force, which left his soul alive while his body was destroyed. Flash villain Eobard Thawne discovered this and found a way to get the ball rolling in the chaos of Infinite Crisis to pull his nemesis out of the Speed Force so he could have the privilege of ending the hero himself.2218An obviously temporary end?
How'd He Go?: The death of Matthew 'Red' Ryan was significant to the remaining Challengers of the Unknown, who had little time to mourn his passing before Red's brother went after the team. His end came about when he sacrificed himself to ensure a charge would explode at the right time to save the rest of the team. "Alone, without another hand or voice to comfort him, the Brave Challenger meets his final challenge!"
How Long Was He Gone?: After his death, his younger brother came onto the team (after first swearing a vendetta against the Challengers). Red returned after being gone for only six issues, and his brother, Marty, left the team after being blinded following some rather serious injuries he sustained as his brother's replacement.
How'd He Come Back?: In Challengers of the Unknown #61, Red returned, and he explained that he wasn't eliminated in the explosion. "Maybe it was because I was at the very eye of the explosion that I wasn't destroyed -- just blown sky-high!" He awoke to a man holding him hostage, but eventually escaped to rejoin the team.50An obviously temporary end?