How to block my school from reading my messages?

So my school has free Wi-Fi, but it downloads something to my iPhone called a 'provisioning profile.' It lets you use your phone normally, but last week my friend got called to the office because he was iMessaging another student about a test. (No cheating.) Apparently the school can track EVERYTHING you do on your phone with a provisioning profile. I would use LTE, but I get no service in school, and at times I need to text my parents in class or lunch. So my question is, how can I stop my school from reading my messages, and does the provisioning profile work outside my school's Wi-Fi, or is it only when I'm connected to it?

Turn off your Wi-Fi and just use the cell service.

The only way is to encrypt any messages you send.

There are a number of chat systems that employ encryption optionally. Or you could create a VPN to a computer back home which would route all your traffic through an encrypted tunnel out to another network (this may be blocked by the school network). You could also use PGP to encrypt each message and email it to the recipient.

Generally you have zero privacy in a school environment (your parents will have agreed to this either directly or indirectly) so the best option is to simply get out of school. Check out home schooling and no-schooling programs. Self directed learning is the most efficient means to success.