If you do a dashing jump attack and smack the necromancer, it will hurt him. Also, the hearts are your health remaining - if you run out of hearts you die.