Officially, they can't prescribe medication, but they can recommend to the parents that a child see a doctor. If the kid is actually a problem child, the outcome for this will often will be drugs.
And the recommendation from the teacher comes with a friendly recommendation to a psychologist that works with other kids in the class. The teacher and the doc probably have wine together once a week.