Punishment for rule-breaking students at Hogwarts varied significantly depending on the authority figure doling it out. Some members of the Hogwarts staff and faculty were excessively harsh in disciplining student. Generally, students might have had house points taken away or receive detention.
Apollyon Pringle punished Arthur Weasley (for being caught out at night with Molly Prewett) in a way that left permanent scars (GF31).
Umbridge had Harry write lines with a black punishment quill that caused the words he wrote down to be scratched into the skin on the back of the hands (OP13, OP15). Educational Decree Number Twenty-Five gave the Hogwarts High Inquisitor (Dolores Umbridge) “supreme authority” over all punishments at Hogwarts. Until then, teachers had discretion in assigning punishments; this allowed Umbridge to overrule them (OP19).
Under Umbridge, Filch walked the halls of Hogwarts with a horsewhip (OP29).