How worried you should be depends on the severity of what you did. Honestly, I wouldn't get too worked up about it, it's not like the teachers can beat you or something, only really yell at you. And as long as it's not something pretty bad that you did (i.e. Took drugs, severely bullied a kid) it most likely won't follow you for life. If what you did is not really bad it's honestly a 'for now' problem and you shouldn't let it worry you. Just remember to learn from your mistakes and not do it again. And if you want to stop worrying distract yourself. Maybe talk to a friend or play a game or listen to music. And if its something that the school would call home about, I would suggest to tell at least one parent you did it beforehand and make them understand how you regret it and won't do it again. It will lessen the blow and they might be less mad at you than if they find out from the school. Just remember that life goes on and this someday will just be a memory and you'll be fine.