The petrifications at Hogwarts during the 1992–1993 school year were carried out by the Basilisk—a thousand-year-old giant serpent lurking in the Chamber of Secrets—under the direct control of Tom Riddle, the teenage memory of Lord Voldemort preserved in his diary.
Every human victim was either Muggle-born or closely associated with Muggle-borns—Colin and Justin directly, Hermione as the most prominent Muggle-born student, Penelope as a Ravenclaw prefect near Hermione, Nick as a ghost who'd been Petrified while trying to help a student. This wasn't random; it reflected Riddle's pureblood supremacist ideology, the same hatred that would later drive his rise as Voldemort.
The mystery's resolution—Harry destroying the diary with a basilisk fang, killing the Basilisk with the Sword of Gryffindor, and saving Ginny—dismantled Riddle's first attempt at physical return.