Illyria is a god from way back when men were muck; in order to ensure the continuation of her reign, she turned herself into an infection, which would hollow out the body and soul of whatever unlucky person happened to be nearby at the appointed moment. That unlucky person was Fred (a likeable but unfortunately somewhat dull science nerd who was cute when she was crazy but is now just blah, so really it was for the best).
If this sounds like an unlikely candidate for arguably the most interesting character on the show, and certainly the savior of Season 5, I would have to agree.
Illyria arrived right when Wesley and Fred finally got together. Of course, this being Joss Whedon and all, that's to be expected. He can't let his characters actually be happy or anything. Fred dies in Wesley's arms, and then jumps back up, suddenly blue and suddenly someone else.
This would all be very evil and terrifying if Illyria had actually meant to kill Fred, or had killed her as anything other than an unavoidable side-effect of her own survival. And the worst of it is that Illyria comes to regret this as much as anyone else: it being millenia later and all, the world is somewhat different than when she left it. Her kingdom has been destroyed in her absence. Her powers (though still incredible by anyone else's standards) are diminished. She kneels before the ruins of her kingdom, murmuring "my world is gone." Wesley points a gun at her and says, "Now you know how I feel." She looks up at him, and he sees that she does, in fact, know how he feels, and is just as broken as he is. He doesn't fire.
And at that moment, Illyria becomes something other than just another big bad. She is lost, and uncertain, and has never been uncertain before. She hesitantly turns to Wesley for guidance: "If I abide, will you help me?" Wesley agrees. "Because I look like Fred?" Wesley whispers, afraid of his own answer: "Yes."
Wesley and Illyria make for an unusual pair. Wesley doesn't blame her for Fred's death, exactly, but of course he can't avoid the fact that she did in fact kill the woman he loved. Illyria thinks humans are vermin, but something about this one--it could be the fact that she retains Fred's memories--merits her respect, among other things. I don't think it could quite be said that Illyria falls in love with Wesley; I don't think she's capable of that. But she feels as strongly for him as she is able to feel at all.
Wesley attempts to reverse the past, to bring Fred back, and in so doing, as an unavoidable side-effect, he would kill Illyria. He fails. Illyria accuses him of betraying her; Wesley shrugs. What else would he do, under these circumstances? Would she do any different? Illyria pauses. "Betrayal was a neutral word in my day. As unjudged a word as water, or breeze." And yet it is clear that Illyria's sense of betrayal is as we would define it now.
Illyria chooses to be blue; she can look and sound like Fred, if she chooses. She offers herself to Wesley, in Fred's form, saying "You feel love for this form. I wish to explore it further." Wesley refuses, horrified, and demands that she never take on Fred's appearance again. The effect on Illyria is like a fourteen-year-old being rejected by her first crush. She doesn't know how to handle it.
While I'm not crazy about Season 5, the last episode is one of my favorites of the series. It has great, classic lines like "Your manservant has become entangled in my bodily fluids again!" This is the kind of show where people say things like that. It's also the kind of show that will make you cry.
This is the last hurrah--they're all going to die at the end of the day, and they know it. The characters all go off to do the one thing they want to do before they die. Wesley stays and bandages a wounded Illyria. She asks him why he isn't off somewhere else, and Wesley shrugs and says where else would he go? There isn't one last walk in the sunshine that will make his life okay. Illyria offers to be Fred for him, knowing that if he could, he would spend his last day with her. This time, the offer is a gift for Wesley, not an attempt to use his emotions for Illyria's own pleasure. He still refuses; he is incapable of lying to himself.
Of course, at the end of the day, Wesley does die. Illyria arrives too late to save him, and asks if now he would like her to lie to him. "Oh, yes please," Wesley says. And Illyria/Fred holds Wesley, telling him how much she loves him, crying as he dies. Illyria says goodbye to Wesley, and Wesley says goodbye to both women.
In seven episodes, Illyria becomes one of the most complex and tragic characters in the entire series. The idea of a god who is suddenly expected to deal with other people's emotions--and incredibly, have them herself--produces an incredible combination of fear, arrogance, power, and vulnerability.