Can a teacher take things away from children and not give it back?
This depends on a lot of details.
If it is something dangerous, either physically or spiritually for the student, not only may the Mechanech take it away, he must confiscate it. It should not be given back to the child and depending on what it is and the age of the student, it might need to be returned to the parents.
Similarly, if a student brings something which they are not allowed to according to the school rules, it may be confiscated.
Poskim disagree whether a teacher may confiscate an object which is disturbing the learning in class such as food or an otherwise permitted toy, or not. Even those who are stringent allow the teacher to hold the object in the front of the room until the class or day is over.
Regarding returning the object, the object usually belongs to the parents of the child. Thus, the teacher may not keep it and must return it.
Even so, the school has the right to make continued attendance at the school conditional on the parent/ student not owning the said object, so that the parents can choose if they prefer the ownership of the item or continued attendance.
When dealing with bochurim: if a Bochur goes against the rules and caused an object to be taken away, he essentially gave up ownership of the object if that is the rule in Yeshiva. Since school rules allow for teachers to confiscate students’ objects when disturbing the learning, it is assumed that any student who attends the school does so with this understanding. Accordingly, the student has effectively relinquished his rights to these objects.
See also here:
Halacha #266: Teacher who Lost Students Computer
ראה תחומין ח”ח ע’ 189 ואילך ושם בהערות העורכים ע’ 199 ואילך. וש”נ. ובשו”ת אבני דרך סי’ קצז – קצח ובהערות שם וש”נ.
#16375