Head to the Potion Club and approach the wooden board . Go to the last page and select the Wiggenweld potion , which will increase your stamina during duels.
Go to the top of the Astronomy Tower  and speak with Dumbledore .
After the cutscene you will have to fight off some living skeletons . It's not hard. All you have to do is strafe and cast Stupefy .
After dealing with three waves of skeletons, another cutscene will play . Afterwards, another battle awaits you . The enemy is quite powerful, so use the bookshelves as cover.
After the duel you will have to fight some more enemies, including Fenrir  and in the end - Bellatrix . The enemies are quite strong, however the basic strategy - Levicorpus followed by a maximally charged Stupefy still works great. Once you finish the last battle, a cutscene will play and the game will end.