Unlike in the real world, death isn't always final in the world of anime. Just because your favorite character bit the dust doesn't mean you'll have to mourn them forever... and on the flip side, just because that character you hate is gone doesn't mean you won't see them again.
Anime characters who came back from the dead tend to appear in fantasy-themed anime - you'll find them in shows like Inuyasha and One Piece, but you're not going to find them in realistic, slice-of-life shows. Sometimes, as in Konosuba and Saga of Tanya the Evil, the character is reborn in a completely different world with new responsibilities, while on the other end of that spectrum, they simply carry on as normal.
Some argue that revivals cheapen the impact of a character's demise, while others feel that it adds intrigue and excitement to a series. Depending on the quality of the series, either one is possible.
Reincarnation is actually quite common the world of Naruto. In fact, when Kakashi Hatake is completely depleted of chakra and is brought back to life by Pain, he isn't the only one. Still, his passing is one of the most noteworthy because of its emotional resonance. Before Nagato resurrects everyone who was lost in the struggle against him, Kakashi gets the opportunity to meet with his father Sakumo. When Kakashi was a child, Sakumo took his own life after being harassed by the rest of their village for failing a critical mission. He regrets not being there to watch his son grow up, and he's able to make peace with him and express those feeling during their brief meeting in the afterlife.
Rin is a human child who Sesshoumaru develops a reluctant affection for. She actually loses her life twice over the course of the series - the first time, she's mauled by wolves, which prompts Sesshoumaru to try out his sword, the Tensaiga, which is capable of reviving people. However, it can only revive each person once, so when Rin suffers another tragedy, he's unable to bring her back using his sword. However, he's able to revive her using the Meidō Stone, an item that his mother gives him after she realizes how desperately he wants to save her. Rin is also able to live a peaceful life as a normal child, who sees Sesshoumaru occasionally when he comes by with gifts for her.
If you don't completely remember this moment from the first Pokémon movie, you either weren't alive when it came out or were too busy crying to pay attention. When Mew and Mewtwo launch powerful beams at each other, Ash gets in between them in an attempt to stop them from fighting. He's hit with the two beams simultaneously, and he falls to the ground with his whole body transformed into a literal rock. With Ash apparently permanently petrified, Pikachu and all the other Pokémon weep inconsolably over his body. The power of their emotions and their tears resurrect Ash, a process that leads Mewtwo to seriously rethink their position.
When Yusuke Urameshi tries to save a small child from being hit by a car, he's struck himself. Because it wasn't actually his time to pass on, and because he redeemed himself somewhat in the eyes of those who control the afterlife, he's given another chance to resume his life. At first, he doesn't want to - he's a depressed and angry teenager who assumes that no one will miss him - but when he sees his mother, classmates, and love interest sobbing at his wake, he realizes that he actually does matter to people and takes the deal. To get his body back, Yusuke will have to become a spirit detective - and that means fighting - and befriending - demons.