Your characters can level up by punching the air (think of it like shadow boxing) but it's much slower then if they have a monster in front of them. Moves like punching, kicking, stabbing, shooting and throwing give ninja levels, moves like bashing, swinging thrusting and so on, give fighter levels, as does going toe-to-toe with a monster and taking damage. Casting wizard spells (and using the vorpal blade) gives wizard levels, and war cries, the horn of fear and priest spells, as have probably guessed, give priest levels.
If your characters are at a high enough level, it may just take a very long time to gain the next level by hacking at black flames with vorpal blades.
BTW, you can also use Des Ew to harm the black flames too.
