In Buffy, Anya Jenkins was a human woman named Aud in eighth-century Scandinavia who dabbled in magic and had a brutish husband named Olaf who hunted trolls and spent too much time at the bar. After Olaf cheats on her with a worker at the bar, she casts a spell to turn him into a troll.
The act impressed a demon master named D’Hoffryn, who offered her a job as a vengeance demon, an entity that grants scorned women their wishes of what they would want to have happen to their boyfriends and husbands. For more than 1,000 years, she did exactly that under her new name of Anyanka (for humans, she created the name Anya Jenkins).
In Season 3 of “Buffy,” she appears at Sunnydale High School to grant a wish by Cordelia Chase after Xander had cheated on her with Willow. Cordelia casually says to her that she wishes Buffy had never come to Sunnydale, and Anya fulfills the wish — sending her into an alternate universe in which Buffy had gone to Cleveland, Ohio, instead and Sunnydale was, almost literally, a hell in which The Master reigned. Eventually, alternate-universe Giles figures out what had happened, destroys Anya’s amulet, and the world reverts back to normal.
Anya was then turned back into a human, now a teenage student at Sunnydale High. At first she tried to help vampires, but then she asks Xander to the prom and then leaves town when the Mayor begins plans to “ascend” and become a demon in pure, gigantic form. She returns in Season 4, starts a relationship and moves in with Xander, is dumped by him at the altar, becomes a vengeance demon and then human again, and then joins the final battle of the series. While saving Andrew’s life, she is killed.
Even as Aud in Scandinavia, Anya was quirky and consider “odd” by other people in the town. After she became human, Anya was still always blunt and strange because she had not been human for 1,000 years. Anya learns over time what it means to be human — and this occurs in both comedic and serious ways. Ultimately, she understood before her death.