Bewitched, Bothered and Bewildered (Buffy the Vampire Slayer)

"Bewitched, Bothered and Bewildered" is episode 16 of season two of "Buffy the Vampire Slayer". It was written by Marti Noxon and first broadcast on February 10, 1998.
In this episode, Cordelia breaks up with Xander after her friends mock her. Xander retaliates by attempting a love spell to "put her through the same hell", and he gets a little more than he had bargained for.
Plot.
During a patrol through the cemetery, Xander shows Buffy a silver necklace he intends to give to Cordelia the following night for Valentine's Day. The next day at school, Xander witnesses Amy Madison use magic to avoid a homework assignment. Soon after, Giles runs into Jenny Calendar; however, their relationship remains frosty, with Giles deciding talking to Buffy is more important than making amends with Jenny. Giles warns Buffy that Angelus becomes particularly vicious around Valentine's Day, and suggests she stays indoors for the following nights. Meanwhile, Cordelia is insulted by Harmony and the Cordettes, revealing to Cordelia that her relationship with Xander is not as secret as she once thought.
Xander gives the necklace to Cordelia, but she breaks up with him under pressure from her friends. Xander is heartbroken, and blackmails Amy into casting a love spell upon Cordelia so he can take revenge by breaking up with her. However, as he intended to use the spell for revenge rather than its true purpose, the magic goes wrong, with Cordelia becoming the only female not to be affected by the spell (protected by her necklace).
The following day, Xander is shocked to find Cordelia repels his advances, and retreats to the library. Buffy makes it clear that she is attracted to Xander, but Amy interrupts them and tells Xander she believes the spell went wrong. She begins to act similarly to Buffy, so Xander rushes home and finds Willow in his bed, where she attempts to seduce him.
The following day, all of the girls of Sunnydale High obsessively start following Xander around the corridors and Harmony criticises a shocked Cordelia for breaking up with Xander. Xander seeks help from Giles, who is appalled by Xander's foolishness. Giles goes looking for Amy, so that she can reverse the spell, while Xander barricades himself in the library. However, Buffy gets in and attempts to seduce a reluctant Xander. Amy also arrives, and becomes jealous of Buffy, ultimately casting a spell that changes Buffy into a rat. An angry Giles orders Xander to go home, while he attempts to make Amy reverse the spells. Oz looks for the Buffy-rat to ensure that she is not hurt.
As Xander is leaving the school, he finds the spell is becoming stronger and more uncontrollable. He saves Cordelia from an attack by Harmony and a group of girls. Xander and Cordelia seek shelter in Buffy's home, locking Joyce out when she too falls under the spell. While in Buffy's room, Xander is pulled out of the window by Angelus, who intends to kill him to upset Buffy. Xander is saved by an infatuated Drusilla. Just as Drusilla is about to turn Xander into a vampire, a group of girls from the school arrive to save him, then Cordelia saves him from the girls. Xander barricades himself in the basement with Cordelia, who is touched to learn that Xander performed the spell for her. The love-crazed mob breaks through the door and attacks Xander and Cordelia just as Giles and Amy manage to lift the spell. Buffy regains human form and the mob disperse, uncertain of why they were there in the first place. The next day Buffy and Xander talk about events and decide it could be worse. Cordelia comes by with her friends and they make fun of Xander when Cordelia suddenly snaps, tells her friends she is way cooler than any of them because she makes up her own mind about what she wants, and she will date who she wants to. She then catches up with Xander and they walk away together holding hands.