Instructions
Avoid getting close to the troll as his melee swings are difficult to dodge and deal a lot of damage. Keep your distance so the troll will throw objects at you instead.
Dodge the projectiles the troll throws at you. Watch for the purple circle around the debris to indicate that you can use the wingardium leviosa spell. Cast the spell on the debris to throw it back at the troll.
Repeat Step 2 until the troll becomes dazed, allowing you to get close to him.
Cast the wingardium leviosa spell on the troll's club, lift it over his head and drop it down to knock him out. This will trigger the cutscene and end the level.