Yelling doesn't solve anything. When a teacher begins yelling, the students stop listening. When a teacher gets to that point, they have lost all control and are at their wits end. The kids need to quit talking and start listening to the teacher. It works both ways.
I doubt they are yelling for no reason. Usually a person, teacher or not, yells to be heard over the noise in the room. You didn't say if the teacher was yelling at you or the entire class. From your incorrect grammar, one might guess you're in a class with some difficulties. Although yelling is generally ineffective, the teacher may be acting on frustrations trying to get the class to listen and/or behave. You might be able to help by appealing to your classmates to cooperate and quiet down.
How much do kids care about learning new things? The usa has the easiest ed system in the world so if you were in another country and clowning around youd be digging ditches or scrubbing clothes disgracing your family. Not teachers fault!