The suspected perpetrator, a 19-year-old man, has been arrested, a police spokeswoman told Polsat News on Wednesday.
The attack took place at a vocational training centre in the town of Ostroleka, just under 100km north of Warsaw.
The injured include both students and teachers.
Eyewitness accounts suggest the young man was holding a knife and attacking people.
Those under attack reportedly shouted for help.
The emergency services were quickly at the scene.
The suspect left the school grounds after the attack but was later arrested on the outskirts of the town, the police spokeswoman said.
Investigations into the attacker's possible motive are continuing.
The town's mayor, Pawel Niewiadomski, said the situation was under control and that the attacker was in custody.
He announced that psychological support would be provided for the pupils and teachers affected.
Ostroleka has a population of about 48,000.
The vocational training centre has been closed until further notice.
Lessons have also been suspended at all other schools in the town.