In Harry Potter 3 the video game how do you get out of the courtyard where the pixies are?

Just follow the same path you used to get to the courtyard.