The petrified students were unpetrified (not resurrected) using two magical components:
Harry applied the fang to each statue while dripping tears onto it, reversing the petrification. This highlighted love, sacrifice, and phoenix magic overcoming dark magic.