The best thing to do is report them, don't feel that it's okay for someone to push you against the wall, especially a teacher. If you tell the principal or your guidance counselor or even another teacher you won't get in trouble, but trust me the teacher who did will. You need to tell your parents too.
If a teacher had pushed you in a wall, then you should report the case to the school board. This is a form of harassment and it is not permitted in schools. You can talk to your principal or your guidance counselor concerning what happened.