I offended my math teacher once. I had a really really witty comeback, and I just muttered it, but a few people around me heard it, and eventually she got one of them to repeat it.
I didn't realize how mad she was until a little while later, but she was apparently very steamed. From there, though, I was just nice, so she now basically just loves me. I've brought home 2 of the school's 3 math trophies and helped with the other (it was a group one) so essentially she's just happy to have me in the school.
Other than that, I've avoided trouble basically altogether. I seem to remember getting sent to the principal once in middle school, but it wasn't a very big thing. He basically just let me go after about 15 slightly uncomfortable seconds of talking.
Oh and once one of my friends was talking to me and I noticed that the teacher was looking, but he wouldn't stop talking at me and the teacher told me off and didn't say a word to him. But later on the teacher figured out what had happened, and apologized sideways.