Interestingly enough, a similar episode is on right now, a rerun of the 2001 Halloween Special. Here's a short summary.

They are at Springwart's School of Wizardry. Harry Potter gets yelled at for chewing gum, but it is really brimstone, and he blows a bit of fire to impress Professor Krabapple. School starts off with the class trying spells to turn frogs into princes. Lisa's prince is a charming British guy while Bart's prince is a vomiting pain-ridden half-frog half-fetus.

Burns is the enemy "Lord Montymort" (with his sidekick "Slither", a snake with Smithers' face) who persuades Bart to betray Lisa.

At school they then have a "magic recital" where Milhouse tries to use an invisibility cloak but turns out exposing his naked self to the whole school and all the parents. Bart replaces Lisa's wand with a twizzler. Lisa's performance is "dragon levitation", but the dragon is really Burns in disguise. When Lisa's wand doesn't work the dragon turns into Burns and starts to suck out her life force. Bart feels bad and kills Burns by poking him in his "enchanted shin" with a wand. Smithers then swallows Burns whole.

Interestingly enough, when Bart tries to use a magic spell to kill Burns, it rebounds and Bart says "Shazbot!" Is Matt Groening a Tribes-playing E2-reading geek?