Discipline in Hogwarts

Apart from losing points from a house, serious misdeeds at Hogwarts are punishable by detention.

According to the school caretaker, Argus Filch, detention meant subjection to various forms of torture until relatively recently. Arthur Weasley claimed still to bear physical scars inflicted by Apollyon Pringle, Filch's predecessor. In present times however, detention usually involves assisting staff or faculty with tedious tasks. Examples of detention include the one imposed on Harry by Umbridge in Order of the Phoenix. In this case, Harry was forced to write, "I must not tell lies" repeatedly using a magical quill which then carves what is written into the back of the writer's hand. However, this cruel punishment is never used by sensible teachers at the school. In another case, when Harry was caught using the Sectumsempra curse on Malfoy by Snape, he was forced to go through over a thousand boxes of files describing wrongdoers at Hogwarts and their punishments. Harry was supposed to order them in alphabetical order, and rewrite the cards whose words are hard to see or otherwise damaged.

For even more serious offences, students may be expelled from Hogwarts. Harry comes under threat of expulsion by the Ministry at the beginning of his fifth year at Hogwarts after he is detected using magic in the presence of Muggles, a serious offence among the wizarding community. Dumbledore argued in Harry's defence, stating that besides the fact that it was done in self-defence, the Ministry has no authority to expel students – such powers are invested in the Headmaster and the Board of Governors. Snape has attempted to have Harry expelled, and he attempted to have Harry's father, James Potter, expelled when they were at Hogwarts together. The only student known to have actually been expelled is Hagrid, for possessing an acromantula believed to be the Monster of Slytherin, and for opening the Chamber of Secrets – a crime for which Tom Riddle had actually framed him.

Professors seemed to be able to punish students with relative impunity and can hand out detention, even for unsatisfactory grades. Enforcement of rules outside of class mainly falls to the caretaker, with the assistance of the prefects. A student's Head of House usually has the final say in disciplinary matters.

In the summer before their fifth year, two fifth year students from each House are picked to be prefects, which grants them extra privileges and responsibilities (e.g. using the prefect's bathroom, controlling younger students)[24] and disciplinary responsibilities; they remain Prefects, unless appointed Head Boy or Girl or stripped of their position, for the rest of their school career. There are four to six prefects per house, all from the fifth, sixth and seventh year students: if one of them has been appointed Head Boy or Head Girl, they are not replaced as Prefects. The leaders of the student body, the Head Boy and Head Girl, are drawn from the seventh year students. A student may be chosen as Head without first being a Prefect as according to Hagrid, James was Head Boy although he was not a Prefect. Prefects have the authority to deduct points from students of their own house for infractions, though they cannot take points from fellow prefects. They may also give detentions. Quidditch house captains are given some of the same privileges as prefects, such as the Prefect's bathroom.

The only known cause for being suspended from Hogwarts is mentioned in passing by Snape in Prisoner of Azkaban. He tells Harry, Ron, and Hermione that they are in enough trouble and facing suspension for being out of bounds while they are in the Shrieking Shack.

It is implied towards the end of Philosopher's Stone, that pupils might be "thrown out" for exceptionally poor examination results at the end of their first year, although this may be an exaggeration of Hermione. The particularly thuggish Gregory Goyle was fortunate to avoid this fate during Harry Potter's first year. The punishment would seem to imply that the pupil has insufficient intelligence or magical ability to become a wizard or witch. What subsequently happens to those thrown out is not explained.