A punishment stool is a stool that is designed such that sitting on it is painful and uncomfortable, usually by means of a special top that is equipped with spikes which dig into the buttocks of the person sitting on it. The delinquent is practically always seated bare bottom on such a stool, so that the pain is felt best and no clothing cushions, or may get damaged by, the spikes.
Often the stool is designed such the person who is made to sit on it can not lift their weight off of their rear. There may be leg rests or restraints, or the stool may simply high enough that the delinquent can't reach the floor with their feet while sitting on it. The absence or arm rests and the instruction to keep one's hands away from the stool (or bondage of the wrists) ensures that the weight can not be lifted by other means.
Spiked chairs were used in some torture chambers in the late and post-Middle Ages. They had spikes of wood or of metal. Some of these "torture chairs" were not built to be actually used, but merely to scare the accused who were shown the chair (similar to the "iron maiden").
No record of spiked stools ot chairs to be used for school corporal punishment is known so far, only the related punishment of kneeling on a painful surface such as a triangular log of wood or a pile of peas.
In spanking fiction and consensual spanking play
Actual punishment stools have been built by some spankophiles and other BDSM fans. The designs are manifold: for example, an array of crown caps can be glued or nailed upside-down onto the stool's top, or holes can be drilled into which pointed dowels (like short pencils) are glued. The same physical principle as a fakir's bed of nails applies: the more nails, and the closer the nails are spaced, the less their impact on the body because the weight is distributed better.
A punishment stool comes with an automatic weight/size compensation: a slim person has a smaller buttocks surface to sit on (which means their weight is distributed on less spikes, which hurts more), but this is compensated by their lesser weight. Therefore the pain is approximately the same as what a bigger and more heavyweight person will feel.