The attack occurred when the boy insisted on returning to school after being permanently excluded for violence and misbehaviour, magistrates at Cardiff youth court heard last week.
The court heard that the boy entered the Cardiff school to meet friends.
Seeing him there, a male and a female teacher attempted to persuade him to leave peacefully. When he refused, the male teacher tried to remove him forcibly.
The boy reacted by lashing out at him. His aim missed and he accidentally hit the female teacher, knocking her to the floor unconscious.
She was taken to hospital, where she was found to have severe bruising on her jaw. There was no permanent disfigurement.
The boy was subsequently charged with assault against both teachers, and actual bodily harm against the female teacher.
Geraint Richards, the solicitor representing the boy, said: "He pleaded guilty at the first opportunity. I think he's remorseful. He's a boy with a lot of problems."
The case has been adjourned for a pre-sentencing report to be compiled by the youth-offending team. Sentence will be passed on September 9.
The chair of governors at the school said she was pleased that the case had been pursued by the courts: "We treat any violence at school very seriously. This child has already been excluded. So we have co-operated with the prosecution and will be reviewing the security of the school."
The female teacher was represented in court by the National Association of Schoolmasters Union of Women Teachers.
Eamonn O'Kane, NASUWT general secretary, said: "Teachers are entitled, like any other employee, not to be abused in the course of their work."