Generally speaking:
* School policies often allow teachers to confiscate phones if they are being used inappropriately during class. This could include texting, using social media, playing games, or taking photos/videos without permission. The school's policy will usually outline procedures for retrieving the phone.
* Teachers generally cannot search a student's phone without probable cause and often require parental or administrative involvement. This is to protect student privacy rights. Simply suspecting a student of wrongdoing isn't sufficient grounds for a search.
* Laws regarding student searches vary. Some jurisdictions have stricter rules about searching students' personal belongings than others. Unlawful searches can have legal consequences.
In short, while a teacher might temporarily take a phone for disruptive classroom behavior as per school policy, they generally cannot randomly search it or keep it indefinitely. If a teacher takes your phone, it's important to understand the school's policy and to contact a parent or administrator if you believe your rights have been violated.