You will first help Luna Lovegood in the Clock Tower Courtyard. After talking to her, use Wingardium Leviosa on a bench and move it to the small "X" by the pear tree. Climb up and Reparo the roof. Use Reducto on the "X", then levitate the Swamp Box down. Climb down; the box should be on the big "X" near the fountain. Step back and cast either Incendio or Reducto. The Swamp Box will explode.
Next, you will then help Ginny Weasley in the Transfiguration Courtyard. After talking to her, use Wingardium Leviosa on the Swamp Box in the tree. A Wizard Encounter with then begin with some Slytherins. Once you defeat them, use Wingardium Leviosa on the box again and move it to the big "X". Use Incendio or Reducto. The Swamp Box will explode.
Finally, you will go to the Paved Courtyard. No one will be there to tell you what to do, but Ron and Hermione will talk to you. Walk up the stairs and go along the path until you reach the broken pipe. Use Reparo. Climb up the pipe, jump onto the ledge, go past the second pipe, climb up the third pipe, jump onto the roof, run along the rooftop, use Wingardium Leviosa on the Swamp Box, and drop it off the roof. Climb down to the ground. Use Incendio or Reducto. The Swamp Box will explode. Ron will tell you that you are finished.